mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
32 lines
1.2 KiB
PHP
32 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Inpsyde\PayPalCommerce\WcGateway;
|
|
|
|
use Psr\Container\ContainerInterface;
|
|
|
|
return [
|
|
|
|
'api.merchant_email' => static function (ContainerInterface $container): string {
|
|
$settings = $container->get('wcgateway.settings');
|
|
return $settings->has('merchant_email') ? (string) $settings->get('merchant_email') : '';
|
|
},
|
|
'api.merchant_id' => static function (ContainerInterface $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' => static function (ContainerInterface $container): string {
|
|
$settings = $container->get('wcgateway.settings');
|
|
$key = $settings->has('client_id') ? (string) $settings->get('client_id') : '';
|
|
return $key;
|
|
},
|
|
'api.secret' => static function (ContainerInterface $container): string {
|
|
$settings = $container->get('wcgateway.settings');
|
|
return $settings->has('client_secret') ? (string) $settings->get('client_secret') : '';
|
|
},
|
|
];
|