how to grap value after ' ? ' |
[eluser]nancy[/eluser]
I am using barclays payment gateway. there i need to pass a return url as we pass in paypal and the response is send with order id appended to the return url for example: i have set returnurl = https://www.example.com/barclays/success/ the payment gateway sends it as GET parameter as https://www.example.com/barclays/success/?oid=abc00001 and i am getting this error A PHP Error was encountered Severity: Warning Message: Missing argument 1 for Barclays: ![]() Filename: controllers/barclays.php Line Number: 154 i have a controller barclay with method success($oid) pls help ?
[eluser]nancy[/eluser]
i entered exactly this but its not getting any value the oid variable displays blank,
[eluser]DeaD SouL[/eluser]
Hi, I've done online payment before for one of my clients,, when initialize the request to the payment gateway they will give you some parameters including the $oid (I think) so, in your response page instead of sending them the success url as Code: https://www.example.com/barclays/success/ Code: https://www.example.com/barclays/failed/ try to send them one page Code: https://www.example.com/barclays/result/($oid)/ and in your result page, you can get and check the $oid by Code: $this->uri->segment(3); if you didn't want that... you can still send them Code: https://www.example.com/barclays/success/($oid)/ [quote author="nancy" date="1307051030"]... and i am getting this error A PHP Error was encountered Severity: Warning Message: Missing argument 1 for Barclays: ![]() Filename: controllers/barclays.php Line Number: 154 ...[/quote] I think no one can help you without seeing what are in these lines [150 - 160] ![]() Advice: since you can not debug what is happening in the response page, I recommend you make a method to save everything in a log file, so you can check it and debug your code.. (this is only for the development environment) Good-luck ![]()
[eluser]nancy[/eluser]
I passed the return url as https://www.example.com/barclays/success/($oid)/ but then the payment gateway calls my return url as https://www.example.com/barclays/success/($oid)/?oid=ADV561549 the error is nothing but its not getting oid and based on that i am fetching data from db.
[eluser]nancy[/eluser]
got it working ![]() Code: parse_str(substr(strrchr($_SERVER['REQUEST_URI'], "?"), 1), $_GET); |
Welcome Guest, Not a member yet? Register Sign In |