mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
when order is already payed through webhook, return success in gateway
This commit is contained in:
parent
7d17bf9f26
commit
abd4c171dc
1 changed files with 10 additions and 0 deletions
|
@ -122,6 +122,16 @@ class PayPalGateway extends \WC_Payment_Gateway
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the WC_Order is payed through the approved webhook.
|
||||
*/
|
||||
if (isset($_REQUEST['ppcp-resume-order']) && $wcOrder->has_status('processing')) {
|
||||
return [
|
||||
'result' => 'success',
|
||||
'redirect' => $this->get_return_url($wcOrder),
|
||||
];
|
||||
}
|
||||
|
||||
if ($this->orderProcessor->process($wcOrder, $woocommerce)) {
|
||||
return [
|
||||
'result' => 'success',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue