i have problem with a callback procedure of a payment method.
the problem is, that the callback will not accept "get" variable.
if they tried something like "index.php?controler=...." will not work....
i tried to make a copy of index.php and "force" the variable, but it didnt work, do you have some idea ?
i'd like to make something like a /iscallback.php so it will work...
the problem is, that the callback will not accept "get" variable.
if they tried something like "index.php?controler=...." will not work....
i tried to make a copy of index.php and "force" the variable, but it didnt work, do you have some idea ?
i'd like to make something like a /iscallback.php so it will work...
You should be able to make this work.
I did a little test by modifying the default paypal callback function and found that it does accept a "get" variable
The url for my test was generated by the following statement...
and looks like...
The result of pasting that url into my browser is exactly what you would expect. The value "freddo" is printed and code execution stops.
I did a little test by modifying the default paypal callback function and found that it does accept a "get" variable
Code: Select all
function callback()
{
if ($this->request->has('user_id', 'get'))
{
die($this->request->get('user_id', 'get'));
}
...
Code: Select all
$this->url->ssl('checkout_process', 'callback', array('payment' => 'paypal','user_id' => 'freddo'))
Code: Select all
http://localhost/store/index.php?controller=checkout_process&action=callback&payment=paypal&user_id=freddo
could you give some explanation on how opencart handles gets?
i was confused by this bit:
been modifying the protx contribution to handle the response from protx - which comes in as a get variable called 'crypt' (which will then need to be decrypted by the protx payment module before the details can be processed). have got things set up well enough as a demo script/class to test its functions, but now that i've started plumbing it into opencart, i'm running out of steam.
...causes a 'page not found' error - but removing the 'crypt' from the url produces the error i'd expect to see (which is the one from my callback function complaining that 'crypt' is not set).
think i'm missing something fundamental in how opencart handles urls/gets rather than running into a specific problem with the module.
i was confused by this bit:
was the generation part important/happening as part of something else? does the url have to be processed and handed over from another file?bruce wrote: The url for my test was generated by the following statement...
and looks like...Code: Select all
$this->url->ssl('checkout_process', 'callback', array('payment' => 'paypal','user_id' => 'freddo'))
Code: Select all
http://localhost/store/index.php?controller=checkout_process&action=callback&payment=paypal&user_id=freddo
been modifying the protx contribution to handle the response from protx - which comes in as a get variable called 'crypt' (which will then need to be decrypted by the protx payment module before the details can be processed). have got things set up well enough as a demo script/class to test its functions, but now that i've started plumbing it into opencart, i'm running out of steam.
Code: Select all
http://www.mywebsite.com/opencart/index.php?controller=checkout_process&payment=protx&action=callback&crypt=iwiJVNlAxEOPTkM...NIBiHwYw==
think i'm missing something fundamental in how opencart handles urls/gets rather than running into a specific problem with the module.
Last edited by ogun on Thu Aug 14, 2008 10:02 am, edited 1 time in total.
usually a few hundred characters - but i've tried it with crypt=test and it still causes the 'page cannot be found' error, as does adding cat=dog or anything else.
seems like it's failing the equivalent of a whitelist somewhere, e.g. expecting controller, payment and action but nothing else.
i haven't changed any core files, just ones in the protx module - should i be editing something to support the new variable? did you have to change any files beyond paypal.php to get your example to work?
seems like it's failing the equivalent of a whitelist somewhere, e.g. expecting controller, payment and action but nothing else.
i haven't changed any core files, just ones in the protx module - should i be editing something to support the new variable? did you have to change any files beyond paypal.php to get your example to work?
bah, it was my own silly fault.
the last time i looked at opencart, i started to make a few changes to router.php specifically for the protx crypt (the crypt can contain forward slashes) and never finished them. that's what was causing the problem. must remember to diff before doing anything else...
/slaps forehead.
the last time i looked at opencart, i started to make a few changes to router.php specifically for the protx crypt (the crypt can contain forward slashes) and never finished them. that's what was causing the problem. must remember to diff before doing anything else...
/slaps forehead.
Who is online
Users browsing this forum: No registered users and 4 guests