Skip to content

Commit

Permalink
Merge branch 'develop' into e2e/7347-merchant-on-boarding
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelzaleski authored Dec 29, 2023
2 parents 7795392 + 62c69cb commit 7b9bed9
Show file tree
Hide file tree
Showing 27 changed files with 1,021 additions and 2,047 deletions.
4 changes: 4 additions & 0 deletions changelog/cleanup-upe-gateways-II
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: dev

Cleanup the deprecated payment gateway processing - part VI
4 changes: 4 additions & 0 deletions changelog/dev-bump-wc-version-8-4-0
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: dev

Bump WC tested up to version to 8.4.0.
33 changes: 0 additions & 33 deletions client/checkout/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,39 +440,6 @@ export default class WCPayAPI {
} );
}

/**
* Process checkout and update payment intent via AJAX.
*
* @param {string} paymentIntentId ID of payment intent to be updated.
* @param {Object} fields Checkout fields.
* @param {string} fingerprint User fingerprint.
* @return {Promise} Promise containing redirect URL for UPE element.
*/
processCheckout( paymentIntentId, fields, fingerprint ) {
return this.request(
buildAjaxURL( getConfig( 'wcAjaxUrl' ), 'checkout', '' ),
{
...fields,
wc_payment_intent_id: paymentIntentId,
'wcpay-fingerprint': fingerprint,
}
)
.then( ( response ) => {
if ( response.result === 'failure' ) {
throw new Error( response.messages );
}
return response;
} )
.catch( ( error ) => {
if ( error.message ) {
throw error;
} else {
// Covers the case of error on the Ajaxrequest.
throw new Error( error.statusText );
}
} );
}

/**
* Submits shipping address to get available shipping options
* from Payment Request button.
Expand Down
Loading

0 comments on commit 7b9bed9

Please sign in to comment.