Subscription ID is null - Merchant Managed Subscription..

Created on 21 November 2024, 5 months ago

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

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada cbovard

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @cbovard
  • Merge request !4Access check was added in Drupal 10 → (Closed) created by cbovard
  • 🇨🇦Canada cbovard

    Hello,
    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

  • 🇨🇦Canada cbovard

    Unassigning for review thank you.

  • Status changed to Needs review 8 days ago
  • First commit to issue fork.
  • Merge request !7Issue #3489035 Fixed query access check → (Merged) created by krystalcode
    • krystalcode committed 7b51ce31 on 8.x-1.x
      Issue #3489035 Fixed query access check
      
      Also:
      - Removed unused storage...
    • krystalcode committed 7b51ce31 on 2.x
      Issue #3489035 Fixed query access check
      
      Also:
      - Removed unused storage...
  • 🇵🇪Peru krystalcode

    Thanks for the contribution.

    I closed your MR since I wanted to merge this through 1.x that 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 latest 2.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 🐛 Refund IPNs fail due to amount formatting Active and 📌 Restructure IPN processing code Active , 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.

  • 🇨🇦Canada cbovard

    Hello,
    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'm getting back to you with some updates after discussing this with our Product team and explaining that you use the Drupal plugin to integrate with us.
    While we see that everything works as it should with your integration (transactions are successfully processed) - we are still uncertain that all of the actions involving Drupal are done using the most recent Web SDK version.
    The Drupal integration was not built/commissioned by BlueSnap - it was created by one of our partners back in 2020, and we do not know what updates or changes have happened with the Drupal open source since. The same goes with the PHP SDK - it was last updated back in 2018 and it seems to be outdated.
    I'm on the fence here because I know that you put a lot of effort into this integration - but at the same time, since BlueSnap does not support nor maintain the Drupal integration, we cannot guarantee that your application will work smoothly after March 1st.
    What I would suggest for you to do next is to contact the Drupal 'Maintainers' of the BlueSnap project:
    https://www.drupal.org/project/commerce_bluesnap
    and ask them these questions:
    Can they confirm that the plugin is using the most recent Web SDK version, as described in the BlueSnap documentation: https://support.bluesnap.com/docs/version-upgrade-faqs#v40-to-v50
    Can they confirm that the Plugin fully supports 3D Secure - because the initial launch did not support it (5 years ago); https://support.bluesnap.com/docs/3d-secure
    Unless you get a clear 'Yes' on both questions - I think that it may be a good idea to consider another integration.
    I apologize for not providing better news, I hope that this information is helpful, at least.

    ---------

    I will try to get on the tests this weekend!

    Thank you for the message!!

Production build 0.71.5 2024