@@ 43-59 (lines=17) @@ | ||
40 | 'payum.action.api.get_transaction_data' => new GetTransactionDataAction(), |
|
41 | ]); |
|
42 | ||
43 | if (false == $config['payum.api']) { |
|
44 | $config['payum.default_options'] = [ |
|
45 | 'MerchantID' => '2000132', |
|
46 | 'HashKey' => '5294y06JbISpM5x9', |
|
47 | 'HashIV' => 'v77hoKGq4kWxNNIS', |
|
48 | 'sandbox' => true, |
|
49 | ]; |
|
50 | ||
51 | $config->defaults($config['payum.default_options']); |
|
52 | $config['payum.required_options'] = ['MerchantID', 'HashKey', 'HashIV']; |
|
53 | ||
54 | $config['payum.api'] = function (ArrayObject $config) { |
|
55 | $config->validateNotEmpty($config['payum.required_options']); |
|
56 | ||
57 | return new EcpayApi((array) $config, $config['payum.http_client'], $config['httplug.message_factory']); |
|
58 | }; |
|
59 | } |
|
60 | } |
|
61 | } |
|
62 |
@@ 47-63 (lines=17) @@ | ||
44 | * 物流介接的 HashIV v77hoKGq4kWxNNIS h1ONHk4P4yqbl5LK |
|
45 | */ |
|
46 | ||
47 | if (false == $config['payum.api']) { |
|
48 | $config['payum.default_options'] = [ |
|
49 | 'MerchantID' => '2000132', |
|
50 | 'HashKey' => '5294y06JbISpM5x9', |
|
51 | 'HashIV' => 'v77hoKGq4kWxNNIS', |
|
52 | 'sandbox' => true, |
|
53 | ]; |
|
54 | ||
55 | $config->defaults($config['payum.default_options']); |
|
56 | $config['payum.required_options'] = ['MerchantID', 'HashKey', 'HashIV']; |
|
57 | ||
58 | $config['payum.api'] = function (ArrayObject $config) { |
|
59 | $config->validateNotEmpty($config['payum.required_options']); |
|
60 | ||
61 | return new EcpayLogisticsApi((array) $config, $config['payum.http_client'], $config['httplug.message_factory']); |
|
62 | }; |
|
63 | } |
|
64 | } |
|
65 | } |
|
66 |