mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
pcp-37 / add endpoint, redirect insufficient funds to paypal to choose different payment method
This commit is contained in:
parent
80b492e083
commit
16501ee765
4 changed files with 90 additions and 11 deletions
|
@ -11,6 +11,7 @@ use Inpsyde\PayPalCommerce\WcGateway\Admin\OrderTablePaymentStatusColumn;
|
|||
use Inpsyde\PayPalCommerce\WcGateway\Admin\PaymentStatusOrderDetail;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Checkout\CheckoutPayPalAddressPreset;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Checkout\DisableGateways;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Endpoint\ReturnUrlEndpoint;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Notice\AuthorizeOrderActionNotice;
|
||||
|
@ -1551,4 +1552,14 @@ return [
|
|||
dirname(__FILE__, 3) . '/woocommerce-paypal-commerce-gateway.php'
|
||||
);
|
||||
},
|
||||
'wcgateway.endpoint.return-url' => static function (ContainerInterface $container) : ReturnUrlEndpoint {
|
||||
$gateway = $container->get('wcgateway.paypal-gateway');
|
||||
$endpoint = $container->get('api.endpoint.order');
|
||||
$prefix = $container->get('api.prefix');
|
||||
return new ReturnUrlEndpoint(
|
||||
$gateway,
|
||||
$endpoint,
|
||||
$prefix
|
||||
);
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue