mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
define paypal host depending on environment
This commit is contained in:
parent
0d0ad67508
commit
d9c3acc77f
1 changed files with 7 additions and 0 deletions
|
@ -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 {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue