Store the fraud result in meta

This commit is contained in:
Narek Zakarian 2024-01-31 17:18:25 +04:00
parent 5c5f459f3b
commit 704bc9cbf0
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7
2 changed files with 9 additions and 0 deletions

View file

@ -52,6 +52,7 @@ class PayPalGateway extends \WC_Payment_Gateway {
const REFUND_FEES_META_KEY = '_ppcp_paypal_refund_fees';
const REFUNDS_META_KEY = '_ppcp_refunds';
const THREE_D_AUTH_RESULT_META_KEY = '_ppcp_paypal_3DS_auth_result';
const FRAUD_RESULT_META_KEY = '_ppcp_paypal_fraud_result';
/**
* The Settings Renderer.

View file

@ -135,5 +135,13 @@ trait CreditCardOrderInfoHandlingTrait {
sprintf( __( 'CVV2 Match: %s', 'woocommerce-paypal-payments' ), esc_html( $fraud_responses['cvv_match'] ) )
);
$wc_order->add_order_note( $cvv_response_order_note );
$wc_order->update_meta_data( PayPalGateway::FRAUD_RESULT_META_KEY, $fraud_responses );
$wc_order->save_meta_data();
/**
* Fired when the fraud result information is added to WC order.
*/
do_action( 'woocommerce_paypal_payments_fraud_result_added', $wc_order, $order );
}
}