mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-10 01:15:45 +08:00
Refactor payment source to handle arbitrary types
This commit is contained in:
parent
99d05ca44d
commit
518a1f4e4e
13 changed files with 59 additions and 287 deletions
|
@ -52,14 +52,14 @@ class ThreeDSecure {
|
|||
if ( ! $order->payment_source() ) {
|
||||
return self::NO_DECISION;
|
||||
}
|
||||
if ( ! $order->payment_source()->card() ) {
|
||||
if ( ! $order->payment_source()->properties()->brand ?? '' ) {
|
||||
return self::NO_DECISION;
|
||||
}
|
||||
if ( ! $order->payment_source()->card()->authentication_result() ) {
|
||||
if ( ! $order->payment_source()->properties()->authentication_result ?? '' ) {
|
||||
return self::NO_DECISION;
|
||||
}
|
||||
|
||||
$result = $order->payment_source()->card()->authentication_result();
|
||||
$result = $order->payment_source()->properties()->authentication_result;
|
||||
$this->logger->info( '3DS authentication result: ' . wc_print_r( $result->to_array(), true ) );
|
||||
|
||||
if ( $result->liability_shift() === AuthResult::LIABILITY_SHIFT_POSSIBLE ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue