mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Fix warning
This commit is contained in:
parent
4c04144c23
commit
7f3d74c8c8
1 changed files with 16 additions and 1 deletions
|
@ -106,8 +106,9 @@ class SavePaymentMethodsModule implements ModuleInterface {
|
|||
}
|
||||
|
||||
if ( $payment_method === PayPalGateway::ID ) {
|
||||
$funding_source = $request_data['funding_source'] ?? null;
|
||||
|
||||
if ( $request_data['funding_source'] === 'venmo' ) {
|
||||
if ( $funding_source === 'venmo' ) {
|
||||
$data['payment_source'] = array(
|
||||
'venmo' => array(
|
||||
'attributes' => array(
|
||||
|
@ -118,6 +119,20 @@ class SavePaymentMethodsModule implements ModuleInterface {
|
|||
),
|
||||
),
|
||||
);
|
||||
} else if ( $funding_source === 'apple_pay' ) {
|
||||
$data['payment_source'] = array(
|
||||
'apple_pay' => array(
|
||||
'stored_credential' => array(
|
||||
'payment_initiator' => 'CUSTOMER',
|
||||
'payment_type' => 'RECURRING',
|
||||
),
|
||||
'attributes' => array(
|
||||
'vault' => array(
|
||||
'store_in_vault' => 'ON_SUCCESS',
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
$data['payment_source'] = array(
|
||||
'paypal' => array(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue