| @@ 49-58 (lines=10) @@ | ||
| 46 | * |
|
| 47 | * @throws \Payum\Core\Exception\InvalidArgumentException if an option is invalid |
|
| 48 | */ |
|
| 49 | public function __construct(array $options, HttpClientInterface $client, MessageFactory $messageFactory, AllInOne $sdk = null) |
|
| 50 | { |
|
| 51 | $this->options = $options; |
|
| 52 | $this->client = $client; |
|
| 53 | $this->messageFactory = $messageFactory; |
|
| 54 | $this->sdk = $sdk ?: new AllInOne(); |
|
| 55 | $this->sdk->HashKey = $this->options['HashKey']; |
|
| 56 | $this->sdk->HashIV = $this->options['HashIV']; |
|
| 57 | $this->sdk->MerchantID = $this->options['MerchantID']; |
|
| 58 | } |
|
| 59 | ||
| 60 | /** |
|
| 61 | * getApiEndpoint. |
|
| @@ 60-69 (lines=10) @@ | ||
| 57 | * |
|
| 58 | * @throws \Payum\Core\Exception\InvalidArgumentException if an option is invalid |
|
| 59 | */ |
|
| 60 | public function __construct(array $options, HttpClientInterface $client, MessageFactory $messageFactory, EcpayLogistics $sdk = null) |
|
| 61 | { |
|
| 62 | $this->options = $options; |
|
| 63 | $this->client = $client; |
|
| 64 | $this->messageFactory = $messageFactory; |
|
| 65 | $this->sdk = $sdk ?: new EcpayLogistics(); |
|
| 66 | $this->sdk->HashKey = $this->options['HashKey']; |
|
| 67 | $this->sdk->HashIV = $this->options['HashIV']; |
|
| 68 | $this->sdk->Send['MerchantID'] = $this->options['MerchantID']; |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * getApiEndpoint. |
|