Skip to content

Commit 1255ed4

Browse files
author
Timur Karimov
committed
merge upe gateway into legacy gateway
1 parent 611f124 commit 1255ed4

24 files changed

+1062
-1642
lines changed

client/checkout/api/index.js

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -440,39 +440,6 @@ export default class WCPayAPI {
440440
} );
441441
}
442442

443-
/**
444-
* Process checkout and update payment intent via AJAX.
445-
*
446-
* @param {string} paymentIntentId ID of payment intent to be updated.
447-
* @param {Object} fields Checkout fields.
448-
* @param {string} fingerprint User fingerprint.
449-
* @return {Promise} Promise containing redirect URL for UPE element.
450-
*/
451-
processCheckout( paymentIntentId, fields, fingerprint ) {
452-
return this.request(
453-
buildAjaxURL( getConfig( 'wcAjaxUrl' ), 'checkout', '' ),
454-
{
455-
...fields,
456-
wc_payment_intent_id: paymentIntentId,
457-
'wcpay-fingerprint': fingerprint,
458-
}
459-
)
460-
.then( ( response ) => {
461-
if ( response.result === 'failure' ) {
462-
throw new Error( response.messages );
463-
}
464-
return response;
465-
} )
466-
.catch( ( error ) => {
467-
if ( error.message ) {
468-
throw error;
469-
} else {
470-
// Covers the case of error on the Ajaxrequest.
471-
throw new Error( error.statusText );
472-
}
473-
} );
474-
}
475-
476443
/**
477444
* Submits shipping address to get available shipping options
478445
* from Payment Request button.

0 commit comments

Comments
 (0)