mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
add specific data for api to gateway
This commit is contained in:
parent
71501e85d2
commit
cbca7491f5
1 changed files with 22 additions and 1 deletions
|
@ -5,5 +5,26 @@ declare(strict_types=1);
|
|||
namespace Inpsyde\PayPalCommerce\WcGateway;
|
||||
|
||||
return [
|
||||
|
||||
|
||||
'api.merchant_email' => function ($container) : string {
|
||||
$settings = $container->get('wcgateway.settings');
|
||||
return $settings->has('merchant_email') ? (string) $settings->get('merchant_email') : '';
|
||||
},
|
||||
'api.merchant_id' => function ($container) : string {
|
||||
$settings = $container->get('wcgateway.settings');
|
||||
return $settings->has('merchant_id') ? (string) $settings->get('merchant_id') : '';
|
||||
},
|
||||
'api.partner_merchant_id' => static function () : string {
|
||||
// ToDo: Replace with the real merchant id of platform
|
||||
return 'KQ8FCM66JFGDL';
|
||||
},
|
||||
'api.key' => function ($container) : string {
|
||||
$settings = $container->get('wcgateway.settings');
|
||||
$key = $settings->has('client_id') ? (string) $settings->get('client_id') : '';
|
||||
return $key;
|
||||
},
|
||||
'api.secret' => function ($container) : string {
|
||||
$settings = $container->get('wcgateway.settings');
|
||||
return $settings->has('client_secret') ? (string) $settings->get('client_secret') : '';
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue