| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | protected function buildHtml(string $endpoint, array $payload): Response |
||
| 37 | { |
||
| 38 | $sHtml = "<form id='pay_form' name='pay_form' action='".$endpoint."' method='POST'>"; |
||
| 39 | foreach ($payload as $key => $val) { |
||
| 40 | $sHtml .= "<input type='hidden' name='".$key."' value='".$val."'/>"; |
||
| 41 | } |
||
| 42 | $sHtml .= "<input type='submit' value='ok' style='display:none;'></form>"; |
||
| 43 | $sHtml .= "<script>document.forms['pay_form'].submit();</script>"; |
||
| 44 | |||
| 45 | return new Response(200, [], $sHtml); |
||
| 46 | } |
||
| 48 |