Post by craigbaines » Wed Dec 14, 2016 7:43 am

Im trying to get recurring payments working for the first time but im running into errors. i have 2.3.0.2 installed, only one small mod.

When i press cancel from the customer end it just says Could not cancel recurring profile, from admin side i get:

Fatal error: Uncaught exception 'Exception' with message 'Error: Could not load model account/recurring!'

The files are there, none of the old directories etc are here, its a fresh 2.3.0.2 install, can any one advise? :/
Last edited by craigbaines on Wed Dec 14, 2016 8:52 am, edited 1 time in total.

New member

Posts

Joined
Wed Jun 25, 2014 8:39 am

Post by craigbaines » Wed Dec 14, 2016 8:52 am

it seems totally broken to me. IPN doesnt seem to be updating my orders at all, no info's added when the second payment was made and order status doesnt change if i go in an cancel it on paypals end.

It's driving me mad, any one clued up on this and can lend me a hand please?

New member

Posts

Joined
Wed Jun 25, 2014 8:39 am

Post by thekrotek » Wed Dec 14, 2016 9:39 am

craigbaines wrote:When i press cancel from the customer end it just says Could not cancel recurring profile, from admin side i get:

Fatal error: Uncaught exception 'Exception' with message 'Error: Could not load model account/recurring!'

The files are there, none of the old directories etc are here, its a fresh 2.3.0.2 install, can any one advise? :/
Admin doesn't have "account" folder for models, it's for catalog only. This is actually a bug in recurringCancel() function.

Try to create "account" folder in admin/model and copy recurring.php in it from catalog/model/account/.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by craigbaines » Wed Dec 14, 2016 9:47 am

Yes im aware that its not an admin folder. Never the less it doesn't explain why it doesn't work from the customer's side?

Anyway, i will try an copy it over an see if it works but now the cancel buttons have disappeared again, i only had them show up for one order and i keep deleting them so atm i have none which are displaying a cancel button option.

The bug you mention, is that simply the file being missing in the admin side?

Am i right thinking that the recurring status stays as pending untill after the first recurring payment, onlyy then will it change and cancel buttons appear? That seems to be what happened last time, except my order went straight to inactive for some unknown reason.

Im looking to set up yearly payments, having it set as pending for an entire year with no optiont o cancel before then seems a bit daft? lol

Thank you for the reply, i really do appreciate any an all help im about ready to get out the hammer.! :)

New member

Posts

Joined
Wed Jun 25, 2014 8:39 am

Post by artcore » Wed Dec 14, 2016 4:28 pm

Hi Craig,

You're right, the ipn is broken for 2.3
Here's an example for the cancel:

file:catalog/controller/extension/payment/pp_express.php - ipn method
'recurring_payment_recurring_cancel'

should be:
'recurring_payment_profile_cancel'

The same for all other txn_types

BTW I have a couple of extensions to improve the recurring part of Opencart. Let me know if you're interested and I'll send you the link to the opencart market.

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 craigbaines » Thu Dec 15, 2016 1:04 am

artcore wrote:Hi Craig,

You're right, the ipn is broken for 2.3
Here's an example for the cancel:

file:catalog/controller/extension/payment/pp_express.php - ipn method
'recurring_payment_recurring_cancel'

should be:
'recurring_payment_profile_cancel'

The same for all other txn_types

BTW I have a couple of extensions to improve the recurring part of Opencart. Let me know if you're interested and I'll send you the link to the opencart market.
Thank you!

"The same for all other txn_types" ?

So do you mean ...

'recurring_payment_skipped' should become 'recurring_payment_profile_skipped' ?

or just the ones mentioning recurring, such as 'recurring_payment_recurring_date_added' which needs to be 'recurring_payment_profile_date_added'

An sure drop me the links ill have a look! :)

Thanks again.

EDIT: just noticed when issuing a refund on the order i got another error too, admin side, no parent id set, sorry to be vague, forgot exactly, it made the refund but order status didn't update, i guess it got cut off before then.

I dont particularly need anything other than the standard setup, it just seems that paypal express is broken with 2.3.0.2, does anyone have a working set of files that they have fixed themselfs?

New member

Posts

Joined
Wed Jun 25, 2014 8:39 am

Post by artcore » Thu Dec 15, 2016 3:16 am

Hi,
Yes parent_id is the new column in the paypal order table. I think it used to be parent_transaction_id.
So somewhere in the model that updates this table is a wrong reference. I'm not at my PC atm but will check later where exactly. All my extensions come with their own bundle of fixes concerning profiles ;D

Here are some of the extensions I was talking about:

Invoice Terminal Use any payment method for profiles, auto create new invoices for new periods and a lot more.

Recurring Order Totals Improve customer experience and understanding when they want to buy a subscription. AJAX profile pricing and profile prices+taxes in the order totals. Also adds support for recurring shipping and a bunch more. It's bundled with Invoice Terminal.

I did a lot of legwork in the profile dept. so if you have questions let me know. Not just about my extensions.

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 artcore » Thu Dec 15, 2016 3:20 am

Here's the paypal doc for subscriptions. As you can see _skipped stays the same.

https://developer.paypal.com/webapps/de ... 8CTB0S055Z

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 craigbaines » Thu Dec 15, 2016 4:37 am

https://github.com/opencart/opencart/pu ... 4080b334e2

I actually found a fix for the parent id error at the link above, im not 100% sure if totally fixes it or if there are other places it needs tweaking, but it does fix it when hitting the refund button at least.

When i make the refund however, via the paypal express tab, the order status doesn't change to refunded automatically, should it? Im not too failure with default behaviour, never used it.

ahh, just reading the paypal link, a lot of whats in the opencart file are not listed there now, i guess there redundant?

New member

Posts

Joined
Wed Jun 25, 2014 8:39 am

Post by craigbaines » Thu Dec 15, 2016 5:43 am

also, do you know if the cancel button only shows after the first recurring payment is made or if it should be there from the start?

New member

Posts

Joined
Wed Jun 25, 2014 8:39 am

Post by artcore » Thu Dec 15, 2016 5:53 am

I see the fix has been merged 3 days ago. Nice.

A refund should be added to the transaction table. Order status should be updated as well depending on the statuses you put in the paypal module, statuses tab.
Enable paypal debugging and see what the logs say!

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 craigbaines » Thu Dec 15, 2016 6:13 am

it issues the refund no problem, but the OP order status doesn't change at all, the refund does get added in the paypal express tab though, its set to change to refunded in my pp express settings.

im struggling to find where in the code it adds history to the order / changes the status. Im looking through all the pp_express files .... If i can find that i can maybe find why its not working but im stumped... :/

New member

Posts

Joined
Wed Jun 25, 2014 8:39 am

Post by craigbaines » Thu Dec 15, 2016 7:28 am

Hmmm, is this correct. In my order_status table, ID 2 = Proccessing.....

On my recurring profiles page, one of them (which just paid the first payment) has now changed its status to "inactive"

I see that its status was changed to a 2 in the order_recurring DB, it then loads the actual status from the lang file for the recurring profiles page.

$_['text_status_2'] = 'Inactive';

should 2 not be pending, or active?

Surly this is wrong? But why.... have i made a mistake or is this just more bugs..

New member

Posts

Joined
Wed Jun 25, 2014 8:39 am

Post by artcore » Thu Dec 15, 2016 4:14 pm

It's correct. Profile statuses are not order statuses.
They go from 0 to 9, 'created' to 'expired', the latter meaning: all done and paid for.

In my ROT+ extension I added the 'created' status set by the IPN callback so the status doesn't stay at 'pending' until the first payment. IPN is not instant btw, takes up to 24 hours but usually within the hour.
As you cannot just sell a profile, you have to attach it to a product with it's own price, the process is as follows...

- Checkout with product price $10 and profile another $10
- OpenCart totals only show product price and other totals like taxes and shipping, no mention of profile cost.
- PayPal items show product name, taxes+shipping+others and a billing agreement ($10 every month until cancelled) on the bottom

$10 is paid instantly and another $10 is taken within 24 hours effectively $20 total. This is a confusing part that my mod solves.

Did you check the opencart error log and enabled PP debugging?

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 craigbaines » Fri Dec 16, 2016 2:04 am

Yes, it's just broken. All i want is default features to work and its all totally screwed haha.

I'm giving up with it, im going back to paypal standard an im just going to build custom mods to handle subscriptions. Ill just simply have it log into a new table when they purchase, and set expiry dates, have a cron sending emails for upcoming expiry date reminders, and any new purchases for the same thing just extend that date.

It will probably serve me better. I appreciate your help but im officially marking paypal express down as a lost cause right now.

New member

Posts

Joined
Wed Jun 25, 2014 8:39 am

Post by artcore » Fri Dec 16, 2016 2:44 am

As you want to use it for hosting, have you looked at WHMCS? Used it myself for years, very rich and stable. Anyway, I wish you all the best with your business!
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 craigbaines » Fri Dec 16, 2016 6:42 am

Yeah, but i dont plan on having all that many, so manually setting them up will be fine for now :)

New member

Posts

Joined
Wed Jun 25, 2014 8:39 am

Post by nikhil123143 » Thu Nov 28, 2019 9:11 pm

craigbaines wrote:
Thu Dec 15, 2016 1:04 am
artcore wrote:Hi Craig,

You're right, the ipn is broken for 2.3
Here's an example for the cancel:

file:catalog/controller/extension/payment/pp_express.php - ipn method
'recurring_payment_recurring_cancel'

should be:
'recurring_payment_profile_cancel'

The same for all other txn_types

BTW I have a couple of extensions to improve the recurring part of Opencart. Let me know if you're interested and I'll send you the link to the opencart market.
Thank you!

"The same for all other txn_types" ?

So do you mean ...

'recurring_payment_skipped' should become 'recurring_payment_profile_skipped' ?

or just the ones mentioning recurring, such as 'recurring_payment_recurring_date_added' which needs to be 'recurring_payment_profile_date_added'

An sure drop me the links ill have a look! :)

Thanks again.

EDIT: just noticed when issuing a refund on the order i got another error too, admin side, no parent id set, sorry to be vague, forgot exactly, it made the refund but order status didn't update, i guess it got cut off before then.

I dont particularly need anything other than the standard setup, it just seems that paypal express is broken with 2.3.0.2, does anyone have a working set of files that they have fixed themselfs?
it is working on opencart Version 3.0.3.2?

Newbie

Posts

Joined
Wed Oct 16, 2019 1:33 pm

Post by straightlight » Sat Dec 28, 2019 3:37 am

Fixed on my Github namespace. Thanks.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 1 guest