-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added refund method and additional tests.
- Loading branch information
1 parent
3028fe9
commit d064f5a
Showing
9 changed files
with
147 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
ini_set('error_reporting', E_ALL); // or error_reporting(E_ALL); | ||
ini_set('display_errors', '1'); | ||
ini_set('display_startup_errors', '1'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Omnipay\Afterpay\Message; | ||
|
||
class RefundRequest extends AbstractRequest | ||
{ | ||
/** | ||
* Get the raw data array for this message. The format of this varies from gateway to | ||
* gateway, but will usually be either an associative array, or a SimpleXMLElement. | ||
* | ||
* @return mixed | ||
*/ | ||
public function getData() | ||
{ | ||
return array ( | ||
'amount' => array( | ||
'amount' => $this->getAmount(), | ||
'currency' => $this->getCurrency() | ||
) | ||
); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getEndpoint() | ||
{ | ||
return parent::getEndpoint() . '/payments/' . $this->getTransactionReference() . '/refund'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters