Skip to content

Commit f1205c1

Browse files
committed
Update gateways to use new sendData method
1 parent 141ce36 commit f1205c1

File tree

44 files changed

+84
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+84
-90
lines changed

src/Omnipay/AuthorizeNet/Message/AbstractRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ protected function getBillingData()
115115
return $data;
116116
}
117117

118-
public function send()
118+
public function sendData($data)
119119
{
120-
$httpResponse = $this->httpClient->post($this->getEndpoint(), null, $this->getData())->send();
120+
$httpResponse = $this->httpClient->post($this->getEndpoint(), null, $data)->send();
121121

122122
return $this->response = new AIMResponse($this, $httpResponse->getBody());
123123
}

src/Omnipay/AuthorizeNet/Message/SIMAuthorizeRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public function getHash($data)
4949
return hash_hmac('md5', $fingerprint, $this->getTransactionKey());
5050
}
5151

52-
public function send()
52+
public function sendData($data)
5353
{
54-
return $this->response = new SIMAuthorizeResponse($this, $this->getData(), $this->getEndpoint());
54+
return $this->response = new SIMAuthorizeResponse($this, $data, $this->getEndpoint());
5555
}
5656
}

src/Omnipay/AuthorizeNet/Message/SIMCompleteAuthorizeRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public function getHash()
2323
return md5($this->getHashSecret().$this->getApiLoginId().$this->getTransactionId().$this->getAmount());
2424
}
2525

26-
public function send()
26+
public function sendData($data)
2727
{
28-
return $this->response = new SIMCompleteAuthorizeResponse($this, $this->getData());
28+
return $this->response = new SIMCompleteAuthorizeResponse($this, $data);
2929
}
3030
}

src/Omnipay/Buckaroo/Message/CompletePurchaseRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public function generateResponseSignature()
3535
);
3636
}
3737

38-
public function send()
38+
public function sendData($data)
3939
{
40-
return $this->response = new CompletePurchaseResponse($this, $this->getData());
40+
return $this->response = new CompletePurchaseResponse($this, $data);
4141
}
4242
}

src/Omnipay/Buckaroo/Message/PurchaseRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public function generateSignature($data)
6363
);
6464
}
6565

66-
public function send()
66+
public function sendData($data)
6767
{
68-
return $this->response = new PurchaseResponse($this, $this->getData());
68+
return $this->response = new PurchaseResponse($this, $data);
6969
}
7070

7171
public function getEndpoint()

src/Omnipay/CardSave/Message/PurchaseRequest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,8 @@ public function getData()
7777
return $data;
7878
}
7979

80-
public function send()
80+
public function sendData($data)
8181
{
82-
$data = $this->getData();
83-
8482
// the PHP SOAP library sucks, and SimpleXML can't append element trees
8583
// TODO: find PSR-0 SOAP library
8684
$document = new DOMDocument('1.0', 'utf-8');

src/Omnipay/Dummy/Message/AuthorizeRequest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ public function getData()
1818
return array('amount' => $this->getAmount());
1919
}
2020

21-
public function send()
21+
public function sendData($data)
2222
{
23-
$data = $this->getData();
2423
$data['reference'] = uniqid();
2524
$data['success'] = 0 === substr($this->getCard()->getNumber(), -1, 1) % 2;
2625
$data['message'] = $data['success'] ? 'Success' : 'Failure';

src/Omnipay/Eway/Message/RapidPurchaseRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ public function getData()
5757
return $data;
5858
}
5959

60-
public function send()
60+
public function sendData($data)
6161
{
62-
$httpResponse = $this->httpClient->post($this->getEndpoint(), null, json_encode($this->getData()))
62+
$httpResponse = $this->httpClient->post($this->getEndpoint(), null, json_encode($data))
6363
->setAuth($this->getApiKey(), $this->getPassword())
6464
->send();
6565

src/Omnipay/FirstData/Message/CompletePurchaseRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ public function getData()
2323
return $this->httpRequest->request->all();
2424
}
2525

26-
public function send()
26+
public function sendData($data)
2727
{
28-
return $this->response = new CompletePurchaseResponse($this, $this->getData());
28+
return $this->response = new CompletePurchaseResponse($this, $data);
2929
}
3030

3131
/**

src/Omnipay/FirstData/Message/PurchaseRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ public function createHash($dateTime, $amount)
7777
return sha1($ascii);
7878
}
7979

80-
public function send()
80+
public function sendData($data)
8181
{
82-
return $this->response = new PurchaseResponse($this, $this->getData());
82+
return $this->response = new PurchaseResponse($this, $data);
8383
}
8484

8585
public function getEndpoint()

0 commit comments

Comments
 (0)