Post by takayuki » Thu Oct 04, 2018 1:56 pm

Hi,

What URL should I use for the paypal IPN in my paypal acct settings?


thanks

New member

Posts

Joined
Thu Aug 13, 2009 10:16 pm

Post by ADD Creative » Fri Oct 05, 2018 6:31 am

None, the PayPal module in OpenCart will pass the IPN URL to PayPal with the payment details.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by takayuki » Sat Oct 06, 2018 5:51 am

Thanks for the reply.

Paypal standard works great on my main site, but on the site I'm about to move to, currently sitting on a subdomain (newsite.mydomain.com), paypal tests fail. Orders get processed at paypal but then all orders go to missing status and item qty does not get subtracted. I've double checked all of the OC settings so I think OC is not getting message from paypal via the IPN url.

any thoughts there?

New member

Posts

Joined
Thu Aug 13, 2009 10:16 pm

Post by ADD Creative » Sat Oct 06, 2018 8:56 am

Login to PayPal and go to More > Sitemap > (Transactions) Instant Payment Notification (IPN) history. Look at your history to see if there are any messages and check the details, such as the URL and response code, which should be 200.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by takayuki » Mon Oct 08, 2018 7:39 pm

Great idea. I checked the IPN history and ran a test order and got a 200 response code and everything else looked fine.

Orders show up in the dashboard, but in the Orders section they go in as missing. Paypal processes everything fine. But item quantity is not subtracted, even though I've got each product set to subtract in the item settings. So an item with qty=1 sells and paypal processes it but the item goes in as a missing order and remains qty=1.

any ideas? thanks.

Dave

New member

Posts

Joined
Thu Aug 13, 2009 10:16 pm

Post by ADD Creative » Tue Oct 09, 2018 2:17 am

Check the OpenCart error logs for anything that could be related. Check all the PayPal Standard module settings (maybe make a note of the settings and uninstall and reinstall).

You could also switch on the debugging messages in the module. You will then see PP_STANDARD :: IPN REQUEST and PP_STANDARD :: IPN RESPONSE messages in the OpenCart error log for each IPN message received. Check you see these and the data contained looks correct.

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by takayuki » Tue Oct 09, 2018 8:59 am

Thanks again for your tips.

I checked the logs and I've gotten 12 PP_STANDARD :: IPN REQUEST: (data here) which all look fine. And it also shows 12 PP_STANDARD :: IPN RESPONSE: VERIFIED messages.

So it looks like the PP standard module is doing it's thing just fine, but all orders still go to missing, and quantities are not subtracted.

Thanks for all your help so far, AC. any other ideas?

New member

Posts

Joined
Thu Aug 13, 2009 10:16 pm

Post by ADD Creative » Tue Oct 09, 2018 6:02 pm

Look at the order 'custom' field which is the order_id and the payment_status in the PayPal message data. Check they look right and look the order up in the database and check it's the same.

If they look OK, but the order status is 0 in the database and you are seeing no error messages in your logs. I would add some more debug messages such as below just before the two $this->model_checkout_order->addOrderHistory lines in the file below.

https://github.com/opencart/opencart/bl ... #L145-L198

Code: Select all

if ($this->config->get('pp_standard_debug')) {
	$this->log->write('PP_STANDARD :: order_id: ' . $order_id, . ' :: order_status_id: ' . $order_status_id);
}
If you are seeing an order status other than 0 the the problem might lie in the addOrderHistory method. Do you have any modifications the mat change this?

www.add-creative.co.uk


Active Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by takayuki » Thu Oct 11, 2018 7:36 am

Thanks so much for all of your help trying to find the problem.

I went as far as I could go with it and then got some help from Zuma Design. He found a bug in order.php.

PHP Fatal error: Call to a member function check() on a non-object in /usr/www/users/chickasaw/octwo.pokevault.com/catalog/model/checkout/order.php on line 267

Here's the fix:
Code was like this:

$fraud_status_id = $this->{'model_fraud_' . $extension['code']}->check($order_info);

Which is wrong.. it should be:

$fraud_status_id = $this->{'model_extension_fraud_' . $extension['code']}->check($order_info);

Now orders don't go to "missing" status anymore and qty subtracts like it should.

thanks again for all of your help.

New member

Posts

Joined
Thu Aug 13, 2009 10:16 pm
Who is online

Users browsing this forum: No registered users and 2 guests