1 | <?php |
||
2 | |||
3 | namespace Omnipay\Moneris\Message; |
||
4 | |||
5 | class DeleteCardRequest extends AbstractRequest |
||
6 | { |
||
7 | 6 | public function getData() |
|
8 | { |
||
9 | 6 | $data = null; |
|
0 ignored issues
–
show
Unused Code
introduced
by
![]() |
|||
10 | 6 | $this->validate('cardReference'); |
|
11 | |||
12 | 6 | $request = new \SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?><request></request>'); |
|
13 | 6 | $request->addChild('store_id', $this->getMerchantId()); |
|
14 | 6 | $request->addChild('api_token', $this->getMerchantKey()); |
|
15 | |||
16 | 6 | $res_delete = $request->addChild('res_delete'); |
|
17 | 6 | $res_delete->addChild('data_key', $this->getCardReference()); |
|
18 | 6 | $data = $request->asXML(); |
|
19 | |||
20 | 6 | return preg_replace('/\n/', '', $data); |
|
21 | } |
||
22 | } |
||
23 |