Problem/Motivation
Hello,
We have installed this module and tested it with Products with success. We are using Commerce Recurring with subscriptions and are testing this Module to make sure it is running the recurring payment. The first payment goes through but after that the others fail.
The error in Watchdog is;
Could not process the "merchant managed subscription create transaction" action for the transaction. Message "An unexpected error happened while processing your request. Please contact Bluesnap support for assistance"
We did reach out to Bluesnap and here was the response:
You're seeing an API call with no subscription ID associated with it, or to better explain - please see the raw incoming recurring API call we received, which triggered this error you're referring to:
<<<>>>
{"currency":"USD","amount":"12.00","subscription_id":null}
<<<>>>
With the endpoint URL being:
https://sandbox.bluesnap.com/services/2/recurring/ondemand/
In case you're attempting to create a recurring charge under an existing subscription, you will need to first associate it with an existing one or a vaulted shopper.
As we mention in our documentation:
https://developers.bluesnap.com/v8976-JSON/reference/create-merchant-man...
If you manage your own subscriptions, the Create Merchant-Managed Subscription Charge request enables you to process recurring charges for a specific subscription. Each charge is associated to the initial subscription based on the subscription ID.
Be sure to let me know if you have any questions or concerns.
Proposed resolution
Is this happening with other people?
I am going to dive into the module code tomorrow and do some tests.
Thank you for your time!
chris
Issue fork commerce_bluesnap-3489035
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3489035-storage-fixes
changes, plain diff MR !7
- 3489035-subscription-id-is
changes, plain diff MR !4
Comments
Comment #2
cbovard commentedComment #4
cbovard commentedHello,
After through testing found the bug was the missing access check for the subscription entities. I added a Merge Request for the change.
Let me know if there is any changes needed.
Reference: https://www.drupal.org/node/3201242
Comment #5
cbovard commentedUnassigning for review thank you.
Comment #11
krystalcode commentedThanks for the contribution.
I closed your MR since I wanted to merge this through
1.xthat I have not removed from the releases yet, so that the fix gets there as well. The code, together with some more improvements/fixes, is on the latest2.x. You should still get credit when the issue is marked as Fixed.I will make a release and mark this as Fixed together with #3518254: Refund IPNs fail due to amount formatting and #3518311: Restructure IPN processing code, once the latter are tested. If you are nevertheless able to test this issue on the latest
2.x, that would be great. I don't have an application with subscriptions at the moment to test this, even though the code is straigh-forward.Comment #12
cbovard commentedHello,
I do have a Drupal project with Subscriptions I can run the tests on. A few months back Bluesnap had issues with their Sandbox. We ended up turning this off for the time being.
I can setup a stage version and add the latest 2.x version and run some tests.
We did get this email from Bluesnap back in Feb about updating their SDK:
---------
I will try to get on the tests this weekend!
Thank you for the message!!
Comment #13
cbovard commentedHello,
There was a delay due to the fact the site did not have a Stage URL that the Bluesnap Webhook could access. We finally got a stage site for testing.
I ran the test after using this version "composer require 'drupal/commerce_bluesnap:2.x-dev@dev'"
I setup a Recurring One hour product and Commerce Recurring is working fine on the Production site. I am using the Bluesnap Sandbox.
It is working and the Payments are recurring (yippy).
One thing have noticed since Bluesnap had issues is the Webhooks (IPNs) area has changed: https://sandbox.bluesnap.com/jsp/webhooks_configuration.jsp (need an account).
I did notice this in the error logs (the Bluesnap SDK):
This is due to their changes to their SDK back in Feb.
I am very happy finally the tests work.
Have a good day and thanks for the help.
chris
Comment #14
cbovard commentedHello,
I am seeing alot of activity today on this module after a year.
Will this issue be closed or should I just delete it?
Guess there will be no credit given.
RE: jsacksick
Comment #15
jsacksick commented@cbovard: I'm focusing my efforts on a new branch. I worked on making the module compatible with Commerce 3 / D11.
On top of that, I worked on migrating to the version 5 of the JS SDK as we've been informed the current SDK will stop working at the end of July (that claim isn't fully verified at this point).
I haven't reviewed this issue yet. The project for which I'm making all of this work doesn't use commerce_recurring.
Comment #16
cbovard commented@jsacksick I closed it. Thank you for the clarification.
Comment #18
jsacksick commented@cbovard: To start with, nobody asked you to beg, and I just checked, you're already credited. fwiw I was added as maintainer yesterday evening.
Comment #19
cbovard commented@jasksick Comment was adjusted Thank you.