| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function build(Request $request) |
||
| 13 | { |
||
| 14 | $data = array_merge( |
||
| 15 | $this->buildBaseRequest(self::TRANSACTION_TYPE), |
||
| 16 | [ |
||
| 17 | 'OrderId' => $request->getOrderId(), |
||
| 18 | 'Total' => $this->amountFormatter->format($request->getAmount()), |
||
| 19 | 'Currency' => $this->currencyCodeFormatter->format($request->getCurrency()), |
||
| 20 | ], |
||
| 21 | $this->buildCard($request->getResource()) |
||
| 22 | ); |
||
| 23 | |||
| 24 | if ($request->getInstallment()) { |
||
| 25 | $data['Taksit'] = $this->installmentFormatter->format($request->getInstallment()); |
||
| 26 | } |
||
| 27 | |||
| 28 | $serializer = new Serializer(Serializer::XML); |
||
| 29 | return $serializer->serialize($data, ['root_name' => self::ENVELOPE_NAME]); |
||
| 30 | } |
||
| 32 |