Skip to content

Commit

Permalink
fix(ReqId): missing in options
Browse files Browse the repository at this point in the history
  • Loading branch information
RomulusED69 committed Mar 18, 2024
1 parent 5a9144c commit 1c545fa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Api
public const FIELD_VADS_CAPTURE = 'Capture';
public const FIELD_VADS_ORDER_DESC = 'OrderDesc';
public const FIELD_MSG_VER = 'MsgVer';
public const FIELD_VADS_REQ_ID = 'ReqID';
public const FIELD_VADS_REQ_ID = 'ReqId';
public const FIELD_VADS_PLAIN = 'Plain';
public const FIELD_VADS_CUSTOM = 'Custom';
public const FIELD_VADS_EXPIRATION_TIME = 'expirationTime';
Expand Down Expand Up @@ -158,6 +158,7 @@ class Api
self::FIELD_VADS_CC_BRAND,
self::FIELD_VADS_VBV,
self::FIELD_VADS_RTF,
self::FIELD_VADS_REQ_ID,
];

private const REQUIRED_FIELDS = [
Expand Down Expand Up @@ -239,6 +240,10 @@ public function doPayment(array $details): void
$this->parameters[static::FIELD_VADS_RTF] = $rtf;
}

if (null !== $reqId = $this->getOption(static::FIELD_VADS_REQ_ID, $details)) {
$this->parameters[static::FIELD_VADS_REQ_ID] = $reqId;
}

$this->parameters[static::FIELD_VADS_ORDER_DESC] = $this->getOption(static::FIELD_VADS_ORDER_DESC, $details);
$this->validate();

Expand Down

0 comments on commit 1c545fa

Please sign in to comment.