define paypal host depending on environment

This commit is contained in:
David Remer 2020-06-29 12:28:25 +03:00
parent 0d0ad67508
commit d9c3acc77f

View file

@ -50,6 +50,13 @@ return [
return 'http://connect-woo.wpcust.com';
},
'api.paypal-host' => function(ContainerInterface $container) : string {
$environment = $container->get('onboarding.environment');
if ($environment->currentEnvironmentIs(Environment::SANDBOX)) {
return 'https://api.sandbox.paypal.com';
}
return 'https://api.paypal.com';
},
'api.bearer' => static function (ContainerInterface $container): Bearer {