Use address from PayPal as preset in checkout PCP-28

This commit is contained in:
David Naber 2020-08-14 17:53:39 +02:00
parent ad61709660
commit 9fe6ee4fb7
3 changed files with 141 additions and 1 deletions

View file

@ -9,6 +9,7 @@ use Inpsyde\PayPalCommerce\ApiClient\Entity\ApplicationContext;
use Inpsyde\PayPalCommerce\Onboarding\State;
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\Gateway\WcGateway;
use Inpsyde\PayPalCommerce\WcGateway\Notice\AuthorizeOrderActionNotice;
@ -544,4 +545,11 @@ return [
],
];
},
'wcgateway.checkout.address-preset' => static function(ContainerInterface $container): CheckoutPayPalAddressPreset {
return new CheckoutPayPalAddressPreset(
$container->get('session.handler')
);
},
];