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 e38606f9 authored by cyattilakiss's avatar cyattilakiss Committed by GitHub

Fix store recurring details (#514)

parent d8743168
...@@ -437,14 +437,16 @@ class Requests extends AbstractHelper ...@@ -437,14 +437,16 @@ class Requests extends AbstractHelper
*/ */
public function buildVaultData($request = [], $payload) public function buildVaultData($request = [], $payload)
{ {
if (!empty($payload[PaymentInterface::KEY_ADDITIONAL_DATA][VaultConfigProvider::IS_ACTIVE_CODE]) && if ($this->adyenHelper->isCreditCardVaultEnabled()) {
$payload[PaymentInterface::KEY_ADDITIONAL_DATA][VaultConfigProvider::IS_ACTIVE_CODE] === true if (!empty($payload[PaymentInterface::KEY_ADDITIONAL_DATA][VaultConfigProvider::IS_ACTIVE_CODE]) &&
) { $payload[PaymentInterface::KEY_ADDITIONAL_DATA][VaultConfigProvider::IS_ACTIVE_CODE] === true
// store it only as oneclick otherwise we store oneclick tokens (maestro+bcmc) that will fail ) {
$request['enableRecurring'] = true; // store it only as oneclick otherwise we store oneclick tokens (maestro+bcmc) that will fail
} else { $request['enableRecurring'] = true;
// explicity turn this off as merchants have recurring on by default } else {
$request['enableRecurring'] = false; // explicity turn this off as merchants have recurring on by default
$request['enableRecurring'] = false;
}
} }
return $request; return $request;
......
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