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 bc1ed8e4 authored by attilak's avatar attilak

fixes based on code review

parent ae4a6d04
......@@ -65,8 +65,7 @@ class CheckoutPaymentsDetailsHandler implements HandlerInterface
$payment->setTransactionId($response['pspReference']);
}
if (!empty($response['additionalData']) &&
!empty($response['additionalData']['recurring.recurringDetailReference'])
if (!empty($response['additionalData']['recurring.recurringDetailReference'])
) {
$order = $payment->getOrder();
......
......@@ -74,8 +74,7 @@ class PaymentPosCloudHandler implements HandlerInterface
// do not send order confirmation mail
$payment->getOrder()->setCanSendNewEmailFlag(false);
if (!empty($paymentResponse['Response']) &&
!empty($paymentResponse['Response']['AdditionalResponse'])
if (!empty($paymentResponse['Response']['AdditionalResponse'])
) {
$pairs = explode('&', $paymentResponse['Response']['AdditionalResponse']);
......
......@@ -61,7 +61,7 @@ class CheckoutResponseValidator extends AbstractValidator
$errorMessages = [];
// validate result
if ($response && isset($response['resultCode'])) {
if (isset($response['resultCode'])) {
switch ($response['resultCode']) {
case "Authorised":
$payment->setAdditionalInformation('pspReference', $response['pspReference']);
......@@ -97,15 +97,15 @@ class CheckoutResponseValidator extends AbstractValidator
case "RedirectShopper":
$payment->setAdditionalInformation('3dActive', true);
if (!empty($paReq = $response['redirect']['data']['PaReq']) &&
!empty($md = $response['redirect']['data']['MD']) &&
!empty($issuerUrl = $response['redirect']['url']) &&
!empty($paymentData = $response['paymentData'])
if (!empty($response['redirect']['data']['PaReq']) &&
!empty($response['redirect']['data']['MD']) &&
!empty($response['redirect']['url']) &&
!empty($response['paymentData'])
) {
$payment->setAdditionalInformation('issuerUrl', $issuerUrl);
$payment->setAdditionalInformation('paRequest', $paReq);
$payment->setAdditionalInformation('md', $md);
$payment->setAdditionalInformation('paymentData', $paymentData);
$payment->setAdditionalInformation('issuerUrl', $response['redirect']['url']);
$payment->setAdditionalInformation('paRequest', $response['redirect']['data']['PaReq']);
$payment->setAdditionalInformation('md', $response['redirect']['data']['MD']);
$payment->setAdditionalInformation('paymentData', $response['paymentData']);
} else {
$isValid = false;
$errorMsg = __('3D secure is not valid.');
......
......@@ -1383,10 +1383,12 @@ class Data extends AbstractHelper
$client = $this->initializeAdyenClient($storeId);
$service = $this->createAdyenCheckoutUtilityService($client);
$respone = $service->originKeys($params);
$response = $service->originKeys($params);
if (empty($originKey = $respone['originKeys'][$url])) {
$originKey = "";
$originKey = "";
if (!empty($response['originKeys'][$url])) {
$originKey = $response['originKeys'][$url];
}
return $originKey;
......@@ -1428,6 +1430,10 @@ class Data extends AbstractHelper
return self::CHECKOUT_COMPONENT_JS_LIVE;
}
/**
* @param $order
* @param $additionalData
*/
public function createAdyenBillingAgreement($order, $additionalData)
{
if (!empty($additionalData['recurring.recurringDetailReference'])) {
......
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