|
@@ 465-477 (lines=13) @@
|
| 462 |
|
* @param IBidirectionalApi $api |
| 463 |
|
* @return self |
| 464 |
|
*/ |
| 465 |
|
protected function prepareApiForRedeem(IBidirectionalApi $api) |
| 466 |
|
{ |
| 467 |
|
$this->setRedeemRequestId($this->coreHelper->generateRequestId(self::REDEEM_REQUST_ID_PREFIX)); |
| 468 |
|
$payload = $api->getRequestBody(); |
| 469 |
|
$payload |
| 470 |
|
->setRequestId($this->getRedeemRequestId()) |
| 471 |
|
->setPin($this->getPin()) |
| 472 |
|
->setAmount($this->getAmountToRedeem()) |
| 473 |
|
->setCurrencyCode($this->getRedeemCurrencyCode()); |
| 474 |
|
$this->setPayloadPaymentContext($payload); |
| 475 |
|
$api->setRequestBody($payload); |
| 476 |
|
return $this; |
| 477 |
|
} |
| 478 |
|
|
| 479 |
|
/** |
| 480 |
|
* Prepare an API instance for a balance request - fill out and set the |
|
@@ 485-497 (lines=13) @@
|
| 482 |
|
* @param IBidirectionalApi $api |
| 483 |
|
* @return self |
| 484 |
|
*/ |
| 485 |
|
protected function prepareApiForVoid(IBidirectionalApi $api) |
| 486 |
|
{ |
| 487 |
|
$this->setRedeemVoidRequestId($this->coreHelper->generateRequestId(self::VOID_REQUST_ID_PREFIX)); |
| 488 |
|
$payload = $api->getRequestBody(); |
| 489 |
|
$payload |
| 490 |
|
->setRequestId($this->getRedeemVoidRequestId()) |
| 491 |
|
->setPin($this->getPin()) |
| 492 |
|
->setAmount($this->getAmountRedeemed()) |
| 493 |
|
->setCurrencyCode($this->getRedeemCurrencyCode()); |
| 494 |
|
$this->setPayloadPaymentContext($payload); |
| 495 |
|
$api->setRequestBody($payload); |
| 496 |
|
return $this; |
| 497 |
|
} |
| 498 |
|
|
| 499 |
|
/** |
| 500 |
|
* Set the payment context on the payload - consists of an order id and |