mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Clean AppSwitch hash params on Pay for Order page
Some checks are pending
CI / PHP 7.4 (push) Waiting to run
CI / PHP 8.0 (push) Waiting to run
CI / PHP 8.1 (push) Waiting to run
CI / PHP 8.2 (push) Waiting to run
CI / PHP 8.3 (push) Waiting to run
CI / PHP 8.4 (push) Waiting to run
PR Playground Demo / prepare_version (push) Waiting to run
PR Playground Demo / build_plugin (push) Blocked by required conditions
PR Playground Demo / create_archive (push) Blocked by required conditions
PR Playground Demo / Comment on PR with Playground details (push) Blocked by required conditions
Some checks are pending
CI / PHP 7.4 (push) Waiting to run
CI / PHP 8.0 (push) Waiting to run
CI / PHP 8.1 (push) Waiting to run
CI / PHP 8.2 (push) Waiting to run
CI / PHP 8.3 (push) Waiting to run
CI / PHP 8.4 (push) Waiting to run
PR Playground Demo / prepare_version (push) Waiting to run
PR Playground Demo / build_plugin (push) Blocked by required conditions
PR Playground Demo / create_archive (push) Blocked by required conditions
PR Playground Demo / Comment on PR with Playground details (push) Blocked by required conditions
This commit is contained in:
parent
af71409850
commit
bde2eb8fbe
1 changed files with 7 additions and 0 deletions
|
@ -1,7 +1,14 @@
|
|||
import resumeFlowHelper from '../Helper/ResumeFlowHelper';
|
||||
|
||||
const onApprove = ( context, errorHandler, spinner ) => {
|
||||
return ( data, actions ) => {
|
||||
spinner.block();
|
||||
errorHandler.clear();
|
||||
// Pay Now submits via form (not AJAX), so we can't detect payment errors.
|
||||
// Preemptively remove hash params to prevent reload issues.
|
||||
if ( resumeFlowHelper.isResumeFlow() ) {
|
||||
resumeFlowHelper.cleanHashParams();
|
||||
}
|
||||
|
||||
return fetch( context.config.ajax.approve_order.endpoint, {
|
||||
method: 'POST',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue