| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function build(Request $request) |
||
| 15 | { |
||
| 16 | //TODO: Normally, the bank can cancel any type of request |
||
| 17 | // but we are going to be assumed we can just do 'cancel' |
||
| 18 | // sale transactions for the first phase. |
||
| 19 | |||
| 20 | $data = array_merge( |
||
| 21 | $this->buildBaseRequest($request), |
||
| 22 | [ |
||
| 23 | self::TRANSACTION_TYPE => [ |
||
| 24 | 'transaction' => self::TEMPORARY_DEFAULT_TRANSACTION_TYPE, |
||
| 25 | 'hostLogKey' => $request->getTransactionId(), |
||
| 26 | //authCode just needed when VFT transaction performed |
||
| 27 | // For the other transaction types we can keep it as '000000' |
||
| 28 | 'authCode' => '000000' |
||
| 29 | ] |
||
| 30 | ] |
||
| 31 | ); |
||
| 32 | |||
| 33 | $serializer = new Serializer(Serializer::XML); |
||
| 34 | return $serializer->serialize($data, ['root_name' => self::ENVELOPE_NAME]); |
||
| 35 | } |
||
| 37 |