mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Do not process payment for oxxo in return url endpoint
This commit is contained in:
parent
d1c4850c4d
commit
abf61a14b8
1 changed files with 6 additions and 0 deletions
|
@ -10,6 +10,7 @@ declare(strict_types=1);
|
|||
namespace WooCommerce\PayPalCommerce\WcGateway\Endpoint;
|
||||
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\OXXO\OXXOGateway;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
||||
use WooCommerce\PayPalCommerce\Webhooks\Handler\PrefixTrait;
|
||||
|
||||
|
@ -72,6 +73,11 @@ class ReturnUrlEndpoint {
|
|||
exit();
|
||||
}
|
||||
|
||||
if ( $wc_order->get_payment_method() === OXXOGateway::ID ) {
|
||||
wp_safe_redirect( wc_get_checkout_url() );
|
||||
exit();
|
||||
}
|
||||
|
||||
$success = $this->gateway->process_payment( $wc_order_id );
|
||||
if ( isset( $success['result'] ) && 'success' === $success['result'] ) {
|
||||
add_filter(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue