Post by VirtualDirect » Sun Sep 06, 2015 9:52 am

Using OpenCart Version 2.0.3.1, in preparation to go live, I am testing the available payment options that I have setup, which at this point is only PayPal Express, as it was the only option that seemed to be available for anything with a recurring profile, and STRIPE which was a purchased add-on.

Both PayPal Express and STRIPE work as expected on a standard LIVE purchase. However, STRIPE seems to be the only option that is working with the LIVE recurring profiles. When I try to make a purchase using PayPal express, I get the following error page:
Notice: Undefined variable: header in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 1
Notice: Undefined variable: breadcrumbs in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 5Warning: Invalid argument supplied for foreach() in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 5
Notice: Undefined variable: column_left in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 9 Notice: Undefined variable: column_left in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 10Notice: Undefined variable: column_left in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 12Notice: Undefined variable: column_right in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 12
Notice: Undefined variable: content_top in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 17
Notice: Undefined variable: heading_title in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 18

Notice: Undefined variable: text_error in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 19

Notice: Undefined variable: button_continue in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 21
Notice: Undefined variable: content_bottom in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 23
Notice: Undefined variable: column_right in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 24
Notice: Undefined variable: footer in /home/userfolder/public_html/cart/catalog/view/theme/default/template/error/not_found.tpl on line 26
There is not even any formatting to this page. The URL shows as follows:

https://userdomain.com/cart/index.php?r ... xxxxxxxxxx

and the transaction is never completed, as when I work my way back to the cart, the item is still in the shopping cart and no transactions in PayPal.

I have no clue where to even begin troubleshooting this. Can anyone point me in the right direction?

Any help would be much appreciated!

Newbie

Posts

Joined
Sun Sep 06, 2015 9:32 am

Post by artcore » Sun Sep 06, 2015 2:33 pm

Is there anything in the error log (admin>system) regarding PayPal Express? Find a string like 'ACK=failure" and see the details...
I've used the recurring profiles successfully with pp express in oc 2031.

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by VirtualDirect » Tue Sep 08, 2015 9:54 am

Here is the line with the reference from above:

Code: Select all

2015-09-05 23:31:44 - PayPal Express debug (Result): "TIMESTAMP=2015%2d09%2d05T23%3a31%3a44Z&CORRELATIONID=f7d871cb8d377&ACK=Failure&VERSION=109%2e0&BUILD=17972692&L_ERRORCODE0=10525&L_SHORTMESSAGE0=Invalid%20Data&L_LONGMESSAGE0=This%20transaction%20cannot%20be%20processed%2e%20The%20amount%20to%20be%20charged%20is%20zero%2e&L_SEVERITYCODE0=Error"
Looks like it is a reference to a $0 charge. The item in reference is $7.99 and I am using a $7.99 coupon.

I've tried this with a coupon and a free trial, but still keep getting the same error.

Any thoughts/suggestions? Thanks!!!

Newbie

Posts

Joined
Sun Sep 06, 2015 9:32 am

Post by artcore » Tue Sep 08, 2015 2:27 pm

That is correct. In a default OC install you can't have a 0,00 checkout when using PP Express.
Also the recurring costs are not added to the Order Totals at checkout, which would fail with the same error as well.

I've made some extensions to get around this as PP does support a zero checkout, eg when creating a recurring profile with a free trial.

Just to inform, some of my solutions:
Real Free Trial Subscriptions
Recurring Costs Order Totals

and others...

There's extensive documentation and a demo for all of them. Don't hesitate to ask should you have more questions.

Cheers

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by VirtualDirect » Wed Sep 09, 2015 1:16 am

So, would I need both of these to make the recurring profiles work?

Also, will this still work with the trial in the recurring profiles disabled, but using a coupon to achieve the same result?
(as mentioned previously)

Newbie

Posts

Joined
Sun Sep 06, 2015 9:32 am

Post by artcore » Wed Sep 09, 2015 1:47 am

It sounds like you need the Recurring Costs Order Totals.

If you have a product price and use the coupon to null it, the checkout would be zero. The profile won't be added to the totals and you can't pay with PP. For this you'd need the Recurring Cost Order Totals extension.

If you want to offer a free trial without any initial costs you need the Real Free Trial Subscription.
The latter is only applicable if you have no other items in the cart but a profile payment, but as you said you want to do it with a coupon.

You can test it on my demo store and buy the Cool Gadget, coupon code = OC-COUPON
http://demo.ilithemes.com/oc2031/index. ... duct_id=55
PayPal runs in sandbox mode...

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by VirtualDirect » Wed Sep 09, 2015 5:13 am

Thanks for that information!

I tested the recurring profile without the coupon and it did go through. I then went into the cart and refunded the transaction. In PayPal it showed the $7.99 debit, then the $7.99 credit. Yet today, I got billed the $7.99 again but there is no record of this in the shopping cart, thus no way to reverse or credit this back to PayPal other then directly through PayPal.

Also, from the recurring payments screen, it shows the transaction as Pending, and if I try to click the `View` button for the order, I just get another error:

Code: Select all

Notice: Trying to get property of non-object in /home/tagsodcom/public_html/cart/admin/model/sale/recurring.php on line 141Warning: Invalid argument supplied for foreach() in /home/tagsodcom/public_html/cart/admin/model/sale/recurring.php on line 141Notice: Error: Could not load template /home/tagsodcom/public_html/cart/admin/view/template/common/buttons.tpl! in /home/tagsodcom/public_html/cart/system/engine/loader.php on line 45
Any advise on this error, or would the additional modules, help with this error as well?

Newbie

Posts

Joined
Sun Sep 06, 2015 9:32 am

Post by artcore » Wed Sep 09, 2015 2:16 pm

That last error is an opencart bug for which I created a fix. http://forum.opencart.com/viewtopic.php?f=10&t=145987

As for the first part, I'm not sure which steps you took, fully. Please give details about product,price,profile,shipping.tax...
If you have a recurring profile for 7.99 charged daily, that'd be expected behavior.


Note to other readers: he's not using my extension but the default oc

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by VirtualDirect » Fri Sep 11, 2015 3:10 am

RE:
That last error is an opencart bug for which I created a fix. viewtopic.php?f=10&t=145987
I uploaded the files from the `recurring_orders_bugfix_oc2031.zip` file and now it actually loads the page, but I still have a couple of errors:

At the top of the page I get this:

Code: Select all

Notice: Trying to get property of non-object in /home/tagsodcom/public_html/cart/admin/model/sale/recurring.php on line 141Warning: Invalid argument supplied for foreach() in /home/username/public_html/cart/admin/model/sale/recurring.php on line 141
On the line directly under `Date Added` I get:

Code: Select all

Undefined variable: entry_payment_reference in /home/username/public_html/cart/admin/view/template/sale/recurring_info.tpl on line 60
RE:
As for the first part, I'm not sure which steps you took, fully. Please give details about product,price,profile,shipping.tax...
If you have a recurring profile for 7.99 charged daily, that'd be expected behavior.
As I stated, I placed a LIVE order via PayPal Express without the coupon. The order went through no problem. From the `Latest Orders` section I clicked the `View` button, and I believe from within this section (sorry, I'm not that familiar with OpenCart yet[<]/i]), I clicked a `Refund` link. In my PayPal account, it showed the debit (-7.99), and the credit (7.99). Still in the same order view in OpenCart, under the `Action` tab, it shows the following information:

Payment information
Capture status: Complete
Amount authorised: 7.99
Amount captured: 0.00
Amount refunded: 0.00
Transactions:
788...W 7.99 Instant Refunded None 2015-09-07 18:58:23 View
7AD...R -7.99 Instant Refunded None 2015-09-07 2015-09-07 19:00:27 View

Product, is a monthly membership to a weekly digital download, no tax, no shipping, with a recurring profile attached.

Going back to `Sales >> Recurring Orders` there is 1 item listed, and clicking the `View` button brings me to the page that now displays (aside from the errors mentioned), thanks to your bug-fix, and clicking the `Recurring Profile` link does show the following:

Recurring Profile
Price: 7.9900
Duration: 0
Cycle: 1
Frequency: Month
Status: Enabled

But somehow, the following day, PayPal charged another 7.99 to my account but this time, there was no reference to this charge anywhere in OpenCart.

Hopefully this provide enough detail.

Newbie

Posts

Joined
Sun Sep 06, 2015 9:32 am

Post by artcore » Fri Sep 11, 2015 4:24 am

Try clearing the vqmod cache.
Both errors are addressed in the bugfix

As for PP charging again the next period seems logical. A refund is not cancelling the profile. Did you activate IPN in your PayPal account? This will ensure your shop gets updated with the transactions. Here's a quick tut from one of my mods
http://ilithemes.com/docs/real-free-tri ... ions/#!/01

I can take a closer look; if you want contact me at support[at]ilithemes.com

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by VirtualDirect » Sat Sep 12, 2015 7:25 am

I'm not sure how to clear the VQMOD cache. There is a `vqmod` folder, which was uploaded as part of the bug-fix, and according to a video I found there should be a `vqcache` folder inside that needs to be deleted in order to clear that cache, but the only folder in the `vqmod` folder is a folder named `xml` (also part of the bug-fix), and in there, a file named `recurring_orders_bugfix_oc2031.xml`

RE:
As for PP charging again the next period seems logical
I'm not sure why that seems logical, to me it seems more logical that the next charge shouldn't be for one month since that is what the profile is setup for. It shouldn't matter that the initial order was refunded. Is this not the correct way to look at this?

RE:
Did you activate IPN in your PayPal account?
As far as I know, the IPN was activated, I've got all the credentials entered for both the sandbox, and regular transactions. Although I always got an error every time I tried to use PP in test mode.

Newbie

Posts

Joined
Sun Sep 06, 2015 9:32 am

Post by artcore » Sat Sep 12, 2015 3:22 pm

OK, I mistakenly assumed everyone has vQmod installed :)
Get the latest version: https://github.com/vqmod/vqmod/releases ... encart.zip
Installation: https://github.com/vqmod/vqmod/wiki/Ins ... n-OpenCart

The sandbox has it's own credentials. Can you verify that sandbox mode is ticked in your admin with the credentials filled out...

A recurring profile can take up to 24 hours to activate from PP's side.
You had a checkout with an initial payment AND a recurring profile, right? They are treated as 2 separate entities.

You did a refund through your PP account of the initial payment but this doesn't affect the profile.

If you're receiving transaction updates from PP to your admin, IPN is working. Otherwise go to your PP account and enter the IPN url in the profile settings.

We're getting there :D

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by VirtualDirect » Mon Sep 14, 2015 5:54 am

RE:
OK, I mistakenly assumed everyone has vQmod installed :)
Get the latest version: https://github.com/vqmod/vqmod/releases ... encart.zip
Installation: https://github.com/vqmod/vqmod/wiki/Ins ... n-OpenCart
VQMOD is installed, and I no longer have any errors when viewing the transaction listed under `Sales >> Recurring Orders`. However, the status is still showing Pending, even though this order was cancelled.

I realize now that there may be a need to follow certain steps in order to cancel/refund an order with a recurring profile which probably was not done on this test order.

Just to clarify the steps relating to this particular order:
  • • Errors received in OC and not completed via PayPal when trying to use a coupon and a $0 amount for checkout
    • Tried to place order without coupon which was successful, and completed on both my personal PP acount and in OC
    • My personal PP account showed the debit of $7.99
    • OC showed the recurring order of $7.99 and while viewing the order, I believe via the action tab, I clicked "Refund"
    • This transaction showed in OC and in my personal PP account.
    • No further action was taken.
    • The following day a new transaction of $7.99 was processed via my personal PP account, but no further information was displayed in OC.
    • I then went back to OC and changed the order status to Canceled which didn't seem to have an affect on anything
    • I cancelled the subscription in my personal PP account.
    • The $7.99 was refunded manually via the OC attached PP account
    • Still no further details related to this order showed in OC.
RE:
The sandbox has it's own credentials. Can you verify that sandbox mode is ticked in your admin with the credentials filled out...
When I was trying to test with the `Test (Sandbox) Mode` set to `Yes` (in PP Express Checkout) I was just getting errors, and could not complete a transaction even though all the following field data had been entered:
  • • API Username
    • API Password
    • API Signature
    • API Sandbox Username
    • API Sandbox Password
    • API Sandbox Signature
    • IPN URL
The transaction in question was processed with the `Test (Sandbox) Mode` set to `No`.

When you say "in my admin" are you referring to PP or OC?

RE:
A recurring profile can take up to 24 hours to activate from PP's side.
You had a checkout with an initial payment AND a recurring profile, right? They are treated as 2 separate entities.
Yex, the is correct, but my thinking is that the initial payment should have been for the first month, and the next payment via the profile, shouldn't have been done until the next month.

RE:
You did a refund through your PP account of the initial payment but this doesn't affect the profile.
This initial refund was done from OC, not from PP directly. But as I mentioned already my thinking is that the initial payment was for the first month, and yes, doing a refund shouldn't affect the profile, but the profile should be that another payment shouldn't occur for one month.

If my thinking is off on this, please correct me.

RE:
If you're receiving transaction updates from PP to your admin, IPN is working.
It seems that I got them initially, but not on any of the "questionable" transactions.

RE:
Otherwise go to your PP account and enter the IPN url in the profile settings.
I'll double check on this.

Thanks!

(I will be picking up your Recurring Costs Order Totals add-on, but I just need to make sure I understand this order process first)

Newbie

Posts

Joined
Sun Sep 06, 2015 9:32 am

Post by artcore » Mon Sep 14, 2015 3:09 pm

If you meant to have the product price as an initial amount and the recurring profile amount for subsequent payments than that wouldn't work either in a default OC setup.
A profile starts the moment you checkout and would cause a double payment (product + profile)
The Recurring Cost Order Totals would give the option to bypass the product price (have it zero and even hide a zero price as not to confuse customers)

As for the other issues, I'm guessing the IPN didn't take.
I can take a closer look at your shop where we make sure the sandbox is working and have a couple of test runs to see if we can get the desired results...

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by VirtualDirect » Tue Sep 15, 2015 12:48 pm

I'm a bit flustered and confused by this whole recurring billing process - However, that was my assumption.

Since with the coupon and a $0 at checkout, I just got errors, I assumed that WITHOUT the coupon, I would pay the price as listed ($7.99), and then the recurring profile would pick up at the time/cycle specified in the profile. In this case in one month.

So if that doesn't work either, sounds like I will need both of the add-on if I want purchases to complete as I expect WITHOUT a coupon as well. Is that correct?

How should we proceed with access to the shop/server?

Newbie

Posts

Joined
Sun Sep 06, 2015 9:32 am

Post by artcore » Tue Sep 15, 2015 2:25 pm

We'll go at it a step at a time, don't worry...
Easiest is email: support [at] ilithemes.com

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands
Who is online

Users browsing this forum: No registered users and 5 guests