payment processor and CodeIgniter |
[eluser]SPeed_FANat1c[/eluser]
Hi, I am trying to integrate payment processor to codeigniter application. The code examples of that payment processor are written in pure PHP. I do them in codeigniter style, but if I do everything in CI style, it does not work. If I do partly in CI style it works. What I do not in CI style is callback function. Callback is called by payment processor server when the money is paid. I simply place callback.php file out of CI directory and it works. The function from payment processor throws an exception WebToPayException: Incompatible library and response versions: libwebtopay 1.3.3, response and before exception there is PHP errors: A PHP Error was encountered Severity: Notice Message: Undefined index: version Filename: libwebtopay/WebToPay.php Line Number: 628 and A PHP Error was encountered Severity: Notice Message: Undefined index: version Filename: libwebtopay/WebToPay.php Line Number: 631 Here is how this function who throws exceptions looks: Code: public static function checkResponse($response, $user_data=array()) { Maybe there is problem with $_GET, don't know, I tried $config['enable_query_strings'] = TRUE; but it didn't help. The question is - is it good practice to just place callback.php somewhere and tell payment server call it directly, without any CI controllers?
[eluser]pickupman[/eluser]
Take a [url="http://stackoverflow.com/questions/2043070/enabling-get-in-codeigniter"]read[/url]. That config value doesn't completely help you as it kills clean urls. There's alot of results on the forums and google for this kind of setup. It would be nice if the payment processors/APIs would you POST instead or offer you the option.
[eluser]skunkbad[/eluser]
I've coded up a few gateway scripts. There's nothing special about doing them. Which gateway are you trying to use?
[eluser]SPeed_FANat1c[/eluser]
I am trying to use https://www.webtopay.com/ Here is the library file if you want to take a look at it http://bitbucket.org/webtopay/libwebtopa...bToPay.php Here is how to integrate it https://www.webtopay.com/macro_specification.html but I cannot see the option about using POST.
[eluser]skunkbad[/eluser]
[quote author="SPeed_FANat1c" date="1290606307"]I am trying to use https://www.webtopay.com/ Here is the library file if you want to take a look at it http://bitbucket.org/webtopay/libwebtopa...bToPay.php Here is how to integrate it https://www.webtopay.com/macro_specification.html but I cannot see the option about using POST.[/quote] This isn't like a traditional gateway, but is like the paypal gateway that I made in Community Cart. You might take a look at it and it might help.
[eluser]SPeed_FANat1c[/eluser]
Will take a look later when I finish some tasks, thanks ![]() |
Welcome Guest, Not a member yet? Register Sign In |