mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Check for PayPal order existence
This commit is contained in:
parent
704bc9cbf0
commit
a383a1a166
1 changed files with 8 additions and 0 deletions
|
@ -108,6 +108,10 @@ class WCGatewayModule implements ModuleInterface {
|
|||
}
|
||||
|
||||
$order = $c->get( 'session.handler' )->order();
|
||||
if ( ! $order ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$fraud = $capture->fraud_processor_response();
|
||||
if ( $fraud ) {
|
||||
$this->handle_fraud( $fraud, $order, $wc_order );
|
||||
|
@ -122,6 +126,10 @@ class WCGatewayModule implements ModuleInterface {
|
|||
'woocommerce_paypal_payments_order_authorized',
|
||||
function ( WC_Order $wc_order, Authorization $authorization ) use ( $c ) {
|
||||
$order = $c->get( 'session.handler' )->order();
|
||||
if ( ! $order ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$fraud = $authorization->fraud_processor_response();
|
||||
if ( $fraud ) {
|
||||
$this->handle_fraud( $fraud, $order, $wc_order );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue