diff --git a/readme.md b/readme.md index 05bf9a1..622619c 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -

+

# NagadApi @@ -40,10 +40,27 @@ $nagad = new Base([ ]); $request = new RequestHandler($nagad); $response = $request->fire(); -echo '
';
-print_r($response); //see response as array
-echo '
'; - +//you will be redirected to your marchantCallbackUrl after successful payment process + + + +//get help from below method for extracting response data from url. Put your response string to below method successReponse() aftermaking object of Helper class + +##example +$helper = new Helper(); +$response = 'https://phpdark.com/payment/success/id=4/?merchant=6878544664000&order_id=EBSXGJ5GHTDRCRO7D&payment_ref_id=MTEyOTAwMjY1NDMxNi42ODGJYSLKJYYYFGFMwMDIwMDcxMDQyMjUuRUJTWEdKNU9ZUUNSTzdELmExODVkYWE4MDAyMDEyM2ZlYzRl&status=Success&status_code=00_0000_000&message=Successful%20Transaction&payment_dt=20201129002747&issuer_payment_ref=MTEyOTAwMjY1NDMxNi42ODMwMDIwMDcxMDQhjfgfyur874HDGFHGLewhfyMjUuRUJTWEdKNU9ZUUNSTzdELmExODVkYWE4MDAyMDEyM2ZlYzRl'; +$responseArray = $helper->successResponse($response); +Array +( + [merchant] => 6878544664000 + [order_id] => EBSXGJ5GHTDRCRO7D + [payment_ref_id] => MTEyOTAwMjY1NDMxNi42ODGJYSLKJYYYFGFMwMDIwMDcxMDQyMjUuRUJTWEdKNU9ZUUNSTzdELmExODVkYWE4MDAyMDEyM2ZlYzRl + [status] => Success + [status_code] => 00_0000_000 + [message] => Successful Transaction + [payment_dt] => 20201129002747 + [issuer_payment_ref] => MTEyOTAwMjY1NDMxNi42ODMwMDIwMDcxMDQhjfgfyur874HDGFHGLewhfyMjUuRUJTWEdKNU9ZUUNSTzdELmExODVkYWE4MDAyMDEyM2ZlYzRl +) ``` #####Maintainer