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
*/
public function buildVaultData($request = [], $payload)
{
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;
} else {
// explicity turn this off as merchants have recurring on by default
$request['enableRecurring'] = false;
if ($this->adyenHelper->isCreditCardVaultEnabled()) {
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;
} else {
// explicity turn this off as merchants have recurring on by default
$request['enableRecurring'] = false;
}
}
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