-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from segsalerty2013/dev
v3 support
- Loading branch information
Showing
13 changed files
with
444 additions
and
151 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/vendor/ | ||
composer.lock | ||
composer.lock | ||
/.idea |
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,26 @@ | ||
<?php | ||
|
||
use Opay\MerchantCashier; | ||
use Opay\Payload\OrderRequest; | ||
use Opay\Utility\OpayConstants; | ||
|
||
$merchantCashier = new MerchantCashier( | ||
"http://api.test.opaydev.com:8081", | ||
"qazwert12345!@#$", | ||
"xxxxxxxxxxxxx", | ||
"XXXXXXXXXXXXX"); | ||
$_orderRequest = new OrderRequest([OpayConstants::PAYMENT_CHANNEL_BALANCE_PAYMENT, OpayConstants::PAYMENT_CHANNEL_BONUS_PAYMENT], "test_201966864458800", | ||
"WOW. The best wireless earphone in history. Cannot agree more! Right!", [OpayConstants::PAYMENT_METHODS_ACCOUNT, OpayConstants::PAYMENT_METHODS_QRCODE], OpayConstants::CURRENCY_NAIRA, | ||
"10", "+2349876543210", "0:0:0:0:0:0:0:1", "https://yourdomain/callback", | ||
"https://yourdomain/return", "Jerry's shop", "Apple AirPods Pro"); | ||
|
||
$merchantCashier->order($_orderRequest); | ||
|
||
$response = $merchantCashier->getOrderApiResult(); | ||
|
||
if($response->getCode() === "00000") { | ||
var_dump($response->getData()); | ||
} | ||
|
||
|
||
|
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,24 @@ | ||
<?php | ||
|
||
use Opay\MerchantCashier; | ||
use Opay\Payload\OrderCloseRequest; | ||
|
||
$merchantCashier = new MerchantCashier( | ||
"http://api.test.opaydev.com:8081", | ||
"qazwert12345!@#$", | ||
"xxxxxxxxxxxxx", | ||
"XXXXXXXXXXXXX"); | ||
|
||
$orderNo = "94578465746574654"; | ||
|
||
$_orderCloseRequest = new OrderCloseRequest($orderNo); | ||
$merchantCashier->orderClose($_orderCloseRequest); | ||
|
||
$response = $merchantCashier->getOrderCloseApiResult(); | ||
|
||
if($response->getCode() === "00000") {; | ||
echo $response->getData(); | ||
} | ||
|
||
|
||
|
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,26 @@ | ||
<?php | ||
|
||
use Opay\MerchantCashier; | ||
use Opay\Payload\OrderStatusRequest; | ||
|
||
$merchantCashier = new MerchantCashier( | ||
"http://api.test.opaydev.com:8081", | ||
"qazwert12345!@#$", | ||
"xxxxxxxxxxxxx", | ||
"XXXXXXXXXXXXX"); | ||
|
||
$orderNo = "94578465746574654"; | ||
$reference = "ref-94857846574654"; | ||
|
||
$_orderStatusRequest = new OrderStatusRequest($orderNo, $reference); | ||
|
||
$merchantCashier->orderStatus($_orderStatusRequest); | ||
|
||
$response = $merchantCashier->getOrderStatusApiResult(); | ||
|
||
if($response->getCode() === "00000") { | ||
echo $response->getData(); | ||
} | ||
|
||
|
||
|
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
Oops, something went wrong.