Skip to content

Commit

Permalink
get response as array instead of object
Browse files Browse the repository at this point in the history
changes commited by @hardevine 

pull request : #30
  • Loading branch information
anandsiddharth authored Jan 25, 2019
1 parent 6c1f5a3 commit 72c2967
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class OrderController extends Controller
{
$transaction = PaytmWallet::with('receive');

$response = $transaction->response() // To get raw response as object
$response = $transaction->response() // To get raw response as array
//Check out response parameters sent by paytm here -> http://paywithpaytm.com/developer/paytm_api_doc?target=interpreting-response-sent-by-paytm

if($transaction->isSuccessful()){
Expand Down Expand Up @@ -138,7 +138,7 @@ class OrderController extends Controller
$status->prepare(['order' => $order->id]);
$status->check();

$response = $status->response() // To get raw response as object
$response = $status->response() // To get raw response as array
//Check out response parameters sent by paytm here -> http://paywithpaytm.com/developer/paytm_api_doc?target=txn-status-api-description

if($status->isSuccessful()){
Expand Down Expand Up @@ -181,7 +181,7 @@ class OrderController extends Controller
'transaction' => $order->transaction_id // provide paytm transaction id referring to this order
]);
$refund->initiate();
$response = $refund->response() // To get raw response as object
$response = $refund->response() // To get raw response as array

if($refund->isSuccessful()){
//Refund Successful
Expand Down Expand Up @@ -220,7 +220,7 @@ class OrderController extends Controller
]);
$refundStatus->check();

$response = $refundStatus->response() // To get raw response as object
$response = $refundStatus->response() // To get raw response as array

if($refundStatus->isSuccessful()){
//Refund Successful
Expand Down

0 comments on commit 72c2967

Please sign in to comment.