|
if ( 'error' === $result['card_verification'] ) { |
|
WC_Checkoutcom_Utility::wc_add_notice_self( __( 'Unable to add payment method to your account.', 'checkout-com-unified-payments-api' ), 'error' ); |
|
wp_redirect( $result['redirection_url'] ); |
|
exit; |
|
} |
|
|
|
// Redirect to my-account/payment-method if card verification successful. |
|
// show notice to customer. |
|
if ( 'Card Verified' === $result['status'] && isset( $result['metadata']['card_verification'] ) ) { |
|
|
|
$this->save_token( get_current_user_id(), $result ); |
|
|
|
WC_Checkoutcom_Utility::wc_add_notice_self( __( 'Payment method successfully added.', 'checkout-com-unified-payments-api' ), 'notice' ); |
|
wp_redirect( $result['metadata']['redirection_url'] ); |
|
exit; |
|
} |
Line 565 with if ( 'error' === $result['card_verification'] ), created an notice error Undefined index: card_verification
So what should be actually checked here? $result['card_verification'] or $result['metadata']['card_verification'] ? OR both?
checkout-woocommerce-plugin/includes/class-wc-gateway-checkout-com-cards.php
Lines 565 to 580 in a21adf3
Line 565 with
if ( 'error' === $result['card_verification'] ), created an notice errorUndefined index: card_verificationSo what should be actually checked here?
$result['card_verification']or$result['metadata']['card_verification']? OR both?