Skip to content

Commit dc65115

Browse files
authored
Merge pull request #8 from chr-hertel/bugfix/common-http-decoder
Replacing http decoder by response parser
2 parents 102951b + 4520039 commit dc65115

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/Message/CompletePurchaseRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Omnipay\Sisow\Message;
44

5-
use Omnipay\Common\Http\Decoder;
5+
use Omnipay\Common\Http\ResponseParser;
66

77
class CompletePurchaseRequest extends PurchaseRequest
88
{
@@ -48,7 +48,7 @@ public function sendData($data)
4848
{
4949
if ($data['trxid']) {
5050
$httpResponse = $this->httpClient->post($this->endpoint, [], http_build_query($data));
51-
return $this->response = new CompletePurchaseResponse($this, Decoder::xml($httpResponse));
51+
return $this->response = new CompletePurchaseResponse($this, ResponseParser::xml($httpResponse));
5252
} else {
5353
$data = array('transaction' => (object) $this->httpRequest->query->all());
5454
return $this->response = new CompletePurchaseResponse($this, (object) $data);

src/Message/FetchIssuersRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Omnipay\Sisow\Message;
44

5-
use Omnipay\Common\Http\Decoder;
5+
use Omnipay\Common\Http\ResponseParser;
66
use Omnipay\Common\Message\AbstractRequest as BaseAbstractRequest;
77

88
class FetchIssuersRequest extends BaseAbstractRequest
@@ -29,6 +29,6 @@ public function sendData($data)
2929

3030
$httpResponse = $this->httpClient->get($endpoint);
3131

32-
return $this->response = new FetchIssuersResponse($this, Decoder::xml($httpResponse));
32+
return $this->response = new FetchIssuersResponse($this, ResponseParser::xml($httpResponse));
3333
}
3434
}

src/Message/FetchPaymentMethodsRequest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
namespace Omnipay\Sisow\Message;
44

5-
use Omnipay\Common\Helper;
6-
use Omnipay\Common\Http\Decoder;
5+
use Omnipay\Common\Http\ResponseParser;
76

87
class FetchPaymentMethodsRequest extends AbstractRequest
98
{
@@ -42,6 +41,6 @@ public function sendData($data)
4241
{
4342
$httpResponse = $this->httpClient->post($this->endpoint, [], http_build_query($data));
4443

45-
return $this->response = new FetchPaymentMethodsResponse($this, Decoder::xml($httpResponse));
44+
return $this->response = new FetchPaymentMethodsResponse($this, ResponseParser::xml($httpResponse));
4645
}
4746
}

src/Message/PurchaseRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Omnipay\Sisow\Message;
44

55
use Omnipay\Common\Exception\InvalidRequestException;
6-
use Omnipay\Common\Http\Decoder;
6+
use Omnipay\Common\Http\ResponseParser;
77

88
/**
99
* Sisow Purchase Request
@@ -211,6 +211,6 @@ public function sendData($data)
211211
{
212212
$httpResponse = $this->httpClient->post($this->endpoint, [], http_build_query($data));
213213

214-
return $this->response = new PurchaseResponse($this, Decoder::xml($httpResponse));
214+
return $this->response = new PurchaseResponse($this, ResponseParser::xml($httpResponse));
215215
}
216216
}

0 commit comments

Comments
 (0)