[SOLVED] redirect url modifies the parameters while sending

capitanluc 08 May, 2013
I configured the parameters of the redirect url action as follows
cmd=_xclick
business=user@domain
currency_code=EUR
item_name=full
amount=1.00

But when the PayPal appear there is the following message:

user%40domain
Your purchase couldn't be completed
Error Message
We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at http://www.paypal.com.


Apparently, seems that the '@' in the e-mail address is changed to %40.
I tried to modify by hands the final URL substituting the %.. with @ and the Paypal webpage worked as expected.
What can I do?
GreyHead 08 May, 2013
Hi capitanluc,

That %40 is because the email is URL encoded. The action has always done that and we haven't see problem reports before so I suspect that it isn't the problem. Please double check that the account email doesn't have some other typo.

Bob
capitanluc 09 May, 2013
thank you for your quick reply.
I double checked the e-mail address and it is correct.
What I've noted is that in the URL produced by the system the @ character is substituted with %2540. As I wrote in my first post, I manually changed %2540 with both @ or %40 and everything worked.
Any suggestions?
Luciano
GreyHead 09 May, 2013
Hi captainluc,

You can try removing the urlencode() from line 62 of /administrator/components/com_chronoforms/form_actions/paypal_redirect/paypal_redirect.php to see if that works.

But I am confused. In your last post you spoke about %2540 which sounds as though the @ is being urlencoded twice - once from @ => %40 and then form %40 => %2540 That would explain the error - but I'm not clear where that second urlencoding is taking place :-(

Which version of Joomla! are you using? I'm wondering if something has been changed in the $mainframe->redirect() method.

Bob
capitanluc 09 May, 2013
Enabling the Debugger I obtain this output
Array
(
    [chronoform] => keikoappform2013
    [event] => submit
    [option] => com_content
    [id] => 52
    [view] => article
    [Itemid] => 78
    [confirmation_page] => _confirm
    [layout] => default
)
Validation Errors: 
Array
(
)
Debug Data
redirect_url
redirect_url_target_url: https://www.paypal.com/cgi-bin/webscr
Redirect URL: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=user%2540domain.it¤cy_code=EUR&item_name=iscrizione&amount=3
redirect_user
redirect_user_target_url: http://
Redirect URL (click to continue):
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=user%2540domain.it¤cy_code=EUR&item_name=iscrizione&amount=3
capitanluc 10 May, 2013
I commented the urlencode block in the file redirect_url.php and it worked!
Thak you.
Luciano
GreyHead 10 May, 2013
Hi Luciano,

Good to see that you found a fix for this. I first thought you were using the PayPal Redirect action - sorry for my mistake.

I still don't understand where the second urlencoding is though - I have used the ReDirect URL action to connect to PayPal successfully many times without needing this fix :-(

Bob
This topic is locked and no more replies can be posted.