| Total Complexity | 10 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class CompletePurchase extends AbstractRequest { |
||
| 6 | |||
| 7 | public function getPaymentId() { |
||
| 9 | } |
||
| 10 | |||
| 11 | public function getInvoiceId() { |
||
| 12 | return isset($_GET['invoiceid']) ? $_GET['invoiceid'] : ''; |
||
| 13 | } |
||
| 14 | |||
| 15 | public function setPaymentId($value) { |
||
| 17 | } |
||
| 18 | |||
| 19 | public function getData() { |
||
| 20 | if($this->getPaymentId()){ |
||
| 21 | $data['Key'] = $this->getPaymentId(); |
||
|
|
|||
| 22 | $data['KeyType'] = "paymentId"; |
||
| 23 | }else{ |
||
| 24 | $data['Key'] = $this->getInvoiceId(); |
||
| 25 | $data['KeyType'] = "invoiceid"; |
||
| 26 | } |
||
| 27 | return $data; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getHttpMethod() { |
||
| 31 | return 'POST'; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getEndpoint() { |
||
| 37 | } |
||
| 38 | |||
| 39 | } |
||
| 40 |