We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 8a942f2b authored by attilak's avatar attilak

Minor fixes

parent 0a01254f
...@@ -67,7 +67,7 @@ class PaymentPosCloudHandler implements HandlerInterface ...@@ -67,7 +67,7 @@ class PaymentPosCloudHandler implements HandlerInterface
$paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($handlingSubject); $paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($handlingSubject);
/** @var OrderPaymentInterface $payment */ /** @var OrderPaymentInterface $payment */
$payment = $payment->getPayment(); $payment = $paymentDataObject->getPayment();
// set transaction not to processing by default wait for notification // set transaction not to processing by default wait for notification
$payment->setIsTransactionPending(true); $payment->setIsTransactionPending(true);
......
...@@ -1272,14 +1272,17 @@ class Data extends AbstractHelper ...@@ -1272,14 +1272,17 @@ class Data extends AbstractHelper
*/ */
public function initializeAdyenClient($storeId = null, $apiKey = null) public function initializeAdyenClient($storeId = null, $apiKey = null)
{ {
if (!$apiKey) { // initialize client
$apiKey = $this->getAPIKey($storeId); $client = new \Adyen\Client();
if ($apiKey) {
$client->setXApiKey($apiKey);
} else {
$client->setUsername($this->getWsUsername($storeId));
$client->setPassword($this->getWsPassword($storeId));
} }
// initialize client
$client = $this->createAdyenClient();
$client->setApplicationName("Magento 2 plugin"); $client->setApplicationName("Magento 2 plugin");
$client->setXApiKey($apiKey);
$client->setAdyenPaymentSource($this->getModuleName(), $this->getModuleVersion()); $client->setAdyenPaymentSource($this->getModuleName(), $this->getModuleVersion());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment