Post by snappyfish » Wed Apr 04, 2012 6:23 am

Using 1.5.2.2 and have paypal standard set up as stated here

http://www.opencart.com/index.php?route ... h=32_35_60

Checking out as a guest the payment goes through fine and appears in the orders section of open cart. All good!

When I refund a payment from Paypal the orders remain "complete" in orders in open cart admin.

Registered Customer - Status changes to refunded.
Guest Customer - Status stays on completed and does not switch to refunded?

In IPN History I see as below

HTTP response code 500
Delivery status Retrying
No. of retries 7

In open cart error log I see

Code: Select all

2012-04-03 22:01:22 - PP_STANDARD :: IPN REQUEST: cmd=_notify-validate&mc_gross=-9.98&invoice=69+-+my+name&protection_eligibility=Partially+Eligible+-+INR+Only&item_number1=Chief+with+Staff+Dreamcatcher&item_number2=&payer_id=6TFZHMBS5W58U&address_street=60+my_address+Rd&payment_date=14%3A55%3A43+Apr+03%2C+2012+PDT&payment_status=Refunded&charset=UTF-8&address_zip=BH11%2ARJ&mc_shipping=0.00&mc_handling=0.00&first_name=gary&mc_fee=-0.34&address_country_code=GB&address_name=my_+name¬ify_version=3.4&reason_code=refund&custom=Z2o%3D&business=Sales%40my_email_address&address_country=United+Kingdom&mc_handling1=0.00&mc_handling2=0.00&address_city=Wallisdown&verify_sign=APHlDiZQRvkYiqkMdsTWQ4tHtI70AfhkM-dkYhKGIeYc7MjPdX2P3CsN&payer_email=my_email_address&mc_shipping1=0.00&mc_shipping2=0.00&tax1=0.00&tax2=0.00&parent_txn_id=02W19936B9344024C&txn_id=6H4145867K536905M&payment_type=instant&last_name=arnold&address_state=&item_name1=Chief+with+Staff+Dreamcatcher&receiver_email=Sales%40my_email_address&item_name2=Shipping%2C+Handling%2C+Discounts+%26+Taxes&payment_fee=&shipping_discount=0.00&quantity1=1&insurance_amount=0.00&quantity2=1&receiver_id=W3TUEB5CCZPZY&discount=0.00&mc_gross_1=4.16&mc_currency=GBP&mc_gross_2=5.82&residence_country=GB&shipping_method=Default&transaction_subject=Z2o%3D&payment_gross=&ipn_track_id=f9dead3a84ca7
2012-04-03 22:01:22 - PP_STANDARD :: IPN RESPONSE: VERIFIED
I'm sure everything was working in 1.5.1.3

So the payment goes through fine but the refund IPN Call back message does not get through? Is there a solution to this?

Thanks

Active Member

Posts

Joined
Thu Apr 14, 2011 4:36 am

Post by Demon5 » Sun Apr 15, 2012 11:13 pm

I am having a problem where IPN isn't getting back to my new 1.5.2.1 upgraded opencart. I just changed the settings in paypal for the PDT Token that seems to have been removed from the paypal standard module.

I resent ipn after that and still no update. I had to actually pull the order out of orders and manually assign it a status since it never popped up when customer ordered. I am getting this in my system/logs/error.log. host says the curl is working fine though

the below comes up in log when I try to resend IPN from paypal side

2012-04-15 14:54:55 - PP_STANDARD :: CURL failed SSL connection timeout(28)
2012-04-15 14:54:55 - PP_STANDARD :: IPN REQUEST: cmd=_notify-validate&mc_gross_1=143.87&$
2012-04-15 14:54:55 - PP_STANDARD :: IPN RESPONSE:

https://www.lotnllc.com is your one stop shop for all your computer needs!


User avatar
Active Member

Posts

Joined
Sat Jun 19, 2010 4:12 am
Location - Sacramento, CA

Post by Hidden Taco » Wed Apr 18, 2012 8:10 am

Qphoria wrote:
snappyfish wrote: Registered Customer - Status changes to refunded.
Guest Customer - Status stays on completed and does not switch to refunded?
Registered. I'll try guest.
I can confirm that it is only a problem for Guest checkouts. Customer checkouts work fine.

Newbie

Posts

Joined
Tue Apr 10, 2012 4:54 pm

Post by Qphoria » Thu Apr 19, 2012 9:20 pm

Demon5 wrote:Actually I don't allow checkout as guest on my site. And now I had another paypal sale not complete on cart side so it stuck in missing. prior to the latest version paypal worked 100% of the time and now is half broken..
@Demon5:
Your issue isn't the same as Hidden Taco's.
Your issue is simply due to your first error:
CURL failed SSL connection timeout(28)
Your site can't connect to paypal because it isn't configured correctly. Contact your host and ask why you cannot connect to paypal over curl port 443

@Hidden Taco, I am looking into the guest ipn stuff now

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Thu Apr 19, 2012 10:18 pm

Ok I found the error. Has nothing to do with paypal directly, but since paypal uses the "update" function for ipn updates.. it is affected.
It is in the update function of the catalog/model/checkout/order.php file
It only loads the model for account/customer if they are customers, but still calls the isBlacklisted function from that model if you are guest, so since the model wasn't loaded, it croaks. The fix:

1. EDIT: catalog/model/checkout/order.php

2. FIND:

Code: Select all

public function update
3. about 10 lines down find:

Code: Select all

if ($order_info['customer_id']) {
	$this->load->model('account/customer');
4. Move the second line in front of the first so it looks like this:

Code: Select all

$this->load->model('account/customer');
if ($order_info['customer_id']) {

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by snappyfish » Thu Apr 19, 2012 11:13 pm

Excellent.. Thank you!

Active Member

Posts

Joined
Thu Apr 14, 2011 4:36 am

Post by Hidden Taco » Fri Apr 20, 2012 6:18 am

Great news. Thanks

Newbie

Posts

Joined
Tue Apr 10, 2012 4:54 pm
Who is online

Users browsing this forum: No registered users and 10 guests