Skip to Content Skip to Menu

[SOLVED] [#8699] J4 & CB Subs possible bug with error code 1366

3 years 2 months ago - 3 years 2 months ago #326288 by RebeccaWool
Hello ,

Possible bug / error with CB Subs running on Joomla 4.

Steps to recreate the problem within CB Subs.
1. Create a subscription plan with recurring payments (weekly, monthly or annual) and publish to the frontend.
2. Set PayPal gateway to Sandbox mode with IPN, APIs and return settings configured.
3. Create a new account on the frontend of your site, select the plan you just created and complete the checkout using PayPal.
4. Sign into PayPal and complete payment and then you will be automatically redirected back to your site.
5. Page loads with an error:

1366 - Incorrect decimal value for column ‘*******_jooml7*’.’josgt_cbsubs_notifications’.’payment_fee’ at row 1

If you try paying again for the plan, the PayPal Sandbox throws an error:

Things aren’t working as they should, try again.

Solutions attempted.
Checked column payment_fee and the cell is populated with Null
Cleared table of all data and retried the above procedure again.
Same result with error as above.

Rechecked all PayPal gateway settings with those in the PayPal Sandbox (IPN, APIs, etc)
Retried the process again with the same error.

Cleared the table josgt_cbsubs_notifications
Switched from PayPal Sandbox server to the normal PayPal server.
Completed all the relevant fields (IPN, APIs, etc) and tried the checkout system again.

Same result with error as above but, PayPal created the subscription and took the initial payment as expected.
However, CB Subs does not recognise the payment has been authorised.
Table josgt_cbsubs_notifications is now populated with the data from the genuine PayPal transaction with cell payment_fee containing Null on row 1 and 0.0000 on row 2.

Any thoughts on a solution please?

Currently running:
Joomla 4.0.2
Community Builder 2.6.2+build.2021.08.23.14.01.24.7ac6157b3
CB Subs 4.5.2+build.2021.06.25.17.09.42.53205149f

Many thanks,

Life is a constant learning curve and I've just started out!
Last edit: 3 years 2 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
3 years 2 months ago #326294 by krileon
What price is your plan set to? It's expecting an actual decimal value and looks like an invalid value format is trying to be stored in that column.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

3 years 2 months ago #326296 by RebeccaWool
Replied by RebeccaWool on topic J4 & CB Subs possible bug with error code 1366
Hello Kyle,

the value entered is 5.00000 for the initial payment and 2.00000 for the remaining payments.
All the zeros are being added by CB Subs, I enter 5.00 before saving.

Note, I have tried this with various amounts, all appear to fail.

Cheers,

Life is a constant learning curve and I've just started out!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
3 years 2 months ago #326298 by krileon
Have added a bug ticket for further investigation. Looks like the mapping of the basket data to IPN data isn't mapping payment_fee correctly.

forge.joomlapolis.com/issues/8699


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: RebeccaWool

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

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
3 years 2 months ago #326305 by beat
There are 2 separate issues reported here that I have tried to reproduce and analyzed:

1. "Incorrect decimal value for column ‘*******_jooml7*’.’josgt_cbsubs_notifications’.’payment_fee’ at row 1"

I could not reproduce it, as Paypal Sandbox sends a correct value in payment_fee field here, but it would be useful to have the corresponding Paypal Sandbox notification record containing among other theings (typically in $_POST) corresponding notification or, if the notification wasn't recorded the corresponding error log.

So if we could see the notification it would help to make sure we fix any other possible issues of such invalid or incomplete Paypal notifications (for payment_fee, it's already fixed in my copy, to be released in a nightly once we see if there are other potential issues).

2. For the 2nd try that gave "Things aren’t working as they should, try again.": That error message from Paypal is not very helpful. Usually that means that a parameter is not what Paypal expected and trying later won't be help. But there is help hidden:

To find the issue, look at network accesses by right-clicking on the CBSubs page before payment in your browser "Inspect", then selecting the "Network" tab, then try paying at sandbox. When that message "Things aren’t working as they should, try again." appears, you should see a POST network access like CreateBillingCart with result code "400". Look at the request Response tab, and you will probably see what the issue is (e.g. more than 52 recurrings or less than 2 (which is the SRT field of Paypal). E.g. I had in a test: ""data": {"TYPE": "INVALID_VALUE", "PARAM": "SRT", "VALUE": "60"}. In this case there were 60 recurrings, but Paypal supports only unlimited recurrings, or 2 to 52 recurrings....

Did you limit the number of recurings in your plan ? If yes to which number ?

Looking forward to your replies with information on those 2 issues (copy to clipboard your reply before sending it as they may trigger our firewall depending on its content).

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

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

  • beat
  • beat
  • ONLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
3 years 2 months ago #326308 by beat
Ok, I think I have fixed what I suspect were the causes for both issues in latest CBSubs nightly build.

The second issue was (I guessed) this one forge.joomlapolis.com/issues/8701 , also fixed in latest nightly.

Please upgrade CBSubs (backup, then CB Plugins->Install/Upgrade, then "Refresh" and "Upgrade all") to latest nighly build and re-test with the Paypal Sandbox.

Then if one of the two tests still doesn't work, I'll really need the information asked above for the corresponding issue.

If all is fixed, please reply too, just to confirm that both issues are now solved. :)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
The following user(s) said Thank You: RebeccaWool

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

Moderators: beatnantkrileon
Powered by Kunena Forum