Skip to content
Prev Previous commit
Next Next commit
Line length fix
  • Loading branch information
lukeholder committed Aug 18, 2016
commit 7f7396e27426c6a7bc923a0b42264144aae32d7e
4 changes: 2 additions & 2 deletions src/Message/HostedAbstractRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ function ($event) {
'Content-Type' => 'application/json'
);

// For some reason the native json encoder built into Guzzle 3 is not encoding the nested data correctly, breaking the http request.
// We need to do it manually.
// For some reason the native json encoder built into Guzzle 3 is not encoding the nested data correctly,
// breaking the http request. We need to do it manually.
$data = json_encode($data);

// Return the response we get back
Expand Down
5 changes: 3 additions & 2 deletions src/Message/HostedAbstractResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ public function getRedirectMethod()

public function isSuccessful()
{
$successfulTransaction = (isset($this->data['transaction']) && isset($this->data['transaction']['status']) && $this->data['transaction']['status'] == 'success');
$successful = (isset($this->data['transaction']['status'])
&& $this->data['transaction']['status'] == 'success');

return !$this->isRedirect() && !isset($this->data['error']) && $successfulTransaction;
return !$this->isRedirect() && !isset($this->data['error']) && $successful;
}

public function getMessage()
Expand Down
3 changes: 2 additions & 1 deletion src/Message/HostedRefundResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ class HostedRefundResponse extends HostedAbstractResponse
{
public function isSuccessful()
{
$successfulTransaction = (isset($this->data['confirmationNumber']) && isset($this->data['authType']) && $this->data['authType'] == 'refund');
$successfulTransaction = (isset($this->data['confirmationNumber'])
&& isset($this->data['authType']) && $this->data['authType'] == 'refund');

return !isset($this->data['error']) && $successfulTransaction;
}
Expand Down