Fix pay now button

not sure if the action parameter in order creation request affects anything, but the docs say that it should match the js sdk commit parameter
This commit is contained in:
Alex P 2023-04-24 08:15:22 +03:00
parent 37959ad2d8
commit 8efa0e6da3
No known key found for this signature in database
GPG key ID: 54487A734A204D71
5 changed files with 38 additions and 2 deletions

View file

@ -110,6 +110,7 @@ return array(
$container->get( 'wcgateway.all-funding-sources' ),
$container->get( 'button.basic-checkout-validation-enabled' ),
$container->get( 'button.early-wc-checkout-validation-enabled' ),
$container->get( 'button.pay-now-contexts' ),
$container->get( 'woocommerce.logger.woocommerce' )
);
},
@ -119,6 +120,9 @@ return array(
dirname( realpath( __FILE__ ), 3 ) . '/woocommerce-paypal-payments.php'
);
},
'button.pay-now-contexts' => static function ( ContainerInterface $container ): array {
return array( 'checkout', 'pay-now' );
},
'button.request-data' => static function ( ContainerInterface $container ): RequestData {
return new RequestData();
},
@ -156,6 +160,7 @@ return array(
$registration_needed,
$container->get( 'wcgateway.settings.card_billing_data_mode' ),
$container->get( 'button.early-wc-checkout-validation-enabled' ),
$container->get( 'button.pay-now-contexts' ),
$logger
);
},