Hello

More
13 years 6 months ago #12040 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Hello
Hi Bill

I haven't changed code in the component. It remains as how it was . I noticed that some customers reported this issues recently and it only happens with Paypal on TEST MODE, not LIVE MODE . Maybe Paypal changes something in Test Mode recently, I am not sure !

Regarding your question Because in your code, to accept the transaction you search for the word "VERIFIED" in the IPN from paypal and in the ipn from the sandbox it doesn't have this word in it. . The reason is for security purpose . If you just check payment_status variable, what happens if someone make a post request (not Paypal) to your site and has payment_status variable set to Completed ? The registration will be approved without clients making any payment.

Hope my explanation is clear to you !

Tuan

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #12128 by robertsm
Replied by robertsm on topic Re: Hello
I'm also having trouble with PayPal, currently only tested with Sandbox, though. I can process the transaction and see the transaction in both the buyer and seller sandbox accounts. However, the test registration is not getting sent an email and there are no records of the registration in the Joomla Admin. When I look in phpMyAdmin I can see the registration, but the "payment_date" field is blank.

A couple of months ago PayPal changed how IPN is carried out. I had just purchased Joombah (joombah.com) and found that this change was causing problems with that component, necessitating that developer to release a new version of their component. At first that developer thought it was only a sandbox issue, but it proved to be a problem with live sites and sandbox.

Did JoomDonation update Event Booking to accomodate this change with the PayPal IPN?

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #12137 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Hello
Right now, it seems the extension still have some problem with Paypal Sandbox. I will try to spend sometime this week to check Paypal Sandbox. However, I am sure that it works with Live Mode . I will update this forum post when sandbox issue solved !

Tuan

Please Log in or Create an account to join the conversation.

  • lebill
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 6 months ago #12159 by lebill
Replied by lebill on topic Re: Hello
Hi Tuan

I'm a developer my self and I fix your component for the sandbox and also fix the validation of the payment in the same time.

Very easy to do , it's only a line of code to change.

In your /components/com_eventbooking/payments/os_paypal.php

at line 177 you have this
Code:
if (eregi("VERIFIED", $response))

For me this is not good because you validate the payment if you found the VERIFIED word in the response from Paypal
if the payment is pending with your code your component allow the sale.

just replace the line with this one
Code:
if ( $this->_data["payment_status"] == "Completed")

With that line it fix the sandbox issue and the transaction is not process if the payment is not completed


Hope it help someone here

Regards

Bill

Please Log in or Create an account to join the conversation.

  • lebill
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 6 months ago - 13 years 6 months ago #12160 by lebill
Replied by lebill on topic Re: Hello
Me again

To answer your explication on the previous post

The reason is for security purpose . If you just check payment_status variable, what happens if someone make a post request (not Paypal) to your site and has payment_status variable set to Completed ? The registration will be approved without clients making any payment.


I don't know if you did this code, but the modification is in the validate() function, in that function you call back paypal to verify if what your os_paypal.php receive is good. And you check if you have the word VERIFIED in the answer (you don;t have anymore this word in the sandbox answer). If what you send to paypal was not good, paypal doesn't return the payment_status or any of the normal variable paypal use, I don;t remember exactly (it's long time I did the test) what is the answer in that case, but I'm sure when you ask Paypal for a cmd=_notify-validate, Paypal never return Paypal's variables with information in it, like email ID's etc... if the infos you try validate are not good

Anyway, I'm just trying to help here

Bill
Last edit: 13 years 6 months ago by lebill.

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #12161 by robertsm
Replied by robertsm on topic Re: Hello
Bill, thanks for posting that!

For those following this thread: I just ran a test event (for $1) and processed via live payment with PayPal. I can confirm that this seems to be mainly a sandbox problem, and that live PayPal payments still process and they will post correctly in the Joomla Admin.

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #12162 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Hello
@All :

I will modify the Paypal payment plugin so that we will just check payment_status variable on the return. For Live Mode, I will keep the code as how it is at the moment and plus checking payment_status as suggested !

It should be done at this time on tomorrow or alitle later !

Tuan

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #12163 by robertsm
Replied by robertsm on topic Re: Hello
Thanks Tuan!

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #12177 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Hello
Update : I just modified Paypal payment plugin alitle and It now works in both Test Mode and Live Mode. You can simply download latest version from Order History, find the file os_paypal.php in com_eventbooking.zip file, upload it to components/com_eventbooking folder. After that, everything will work as expected !

Tuan

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #12178 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Hello
@lebill : Just FYI, the code I used is :
Code:
if ($this->_mode) { if (eregi("VERIFIED", $response) && ($this->_data['payment_status'] == 'Completed')) return true; else return false; } else { if ($this->_data['payment_status'] == 'Completed') return true ; else return false ; }

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc