Services Plugins FAQs

Make change to things work in debugge and doesn't reflect in database

Hello Everyone, hope you’re all safe and doing well,

So here’s my problem :

I’m creating the checkout workflow for a payment gateway, so here’s how it works :

  • When user chose this payment type, the app make an API call to the payment gateway sending this Infos: VendorID, amount (of current checkout) and a note (text), the call return a Token(we’ll call it payment-token) that I’ll be using when sending the user to their payment gateway.

By the meantime, I also store the payment-token in the localStorage, to retrieve it after the user return from the payment gateway. And add a payment in my DB, containing all necessary pieces of information, with “status”: “No”.

After that that the user get a payment button with a hidden form(Including an ok_url and a ko_url, containing the Infos I need to send to the payment gateway.

The user then is redirected to the payment gateway authentication page and if payment succeed is sent to my redirection page wich mission, is to verify if the said payment has been successfully paid, here’s the workflow :

  • On Page load -> Extract the payment-token from localStorage -> API call to verify if payment token has been paid -> Do a search for payment whose token = payment-token and change status to “yes” Only when API call return “True” -> Redirect to thank you page

So i have a problem in the status change in the debugger it appears as changed, but when i verify in my DB, nothing has changed,

I tried many things, I can’t understand why the changes reflect in the debugger, but not in the DB, can you help me, please ?

Note: I use createry template
Sorry if my english is bad, hope you have understood me :smiley:

Hello

Hello, @gharbimelek92. Thanks for reaching out.

Can you please try to execute your problematic workflow, with the active “Add break-point in debug mode” checkbox? By this, you can make sure that your workflow is executed correctly.
image

Also, if it is possible, I’d like to ask you to share with us the screenshots of your workflow (and debugger after executing the workflow with the checkbox I’ve mentioned) - it can help us visualize your issue and investigate it a bit faster.
Also, you can add our support@zeroqode.com email as a collaborator of your app for the issue investigation - indicate the page and element, where the problematic workflow is placed.

You can add the support account as a collaborator even if your app plan is a Hobby.

Thank you!
Regards,

Hello Kate, thanks for you reply !
btw, support@zeroqodecom is already a collaborator on the app, you helped me with a previous struggle :smiley: (page : paymee-redirection-page, workflow : page is loaded, action : make changes to payment)
here’s the link :

Here’s the screenshot of the debugger :


image
But in the DB, here’s what we find :

@gharbimelek92,

Thanks for providing the access to your app :slightly_smiling_face:
The investigation might take some time, I will let you know once I have any useful update for you.

Thank you for understanding.
Regards

@gharbimelek92,

The most probable reason, why the status value, which should be added into the Payment table, is not “yes” - is the improper execution of the previous actions.

If one of the previous actions containing an error or it’s value ≠ true (API calls), the last one action (Make changes to Payment) will not be recorded into the Payment table with the value “yes”.

Also, your Make changes to Payment action has the condition "only when Result of step 3’s body is 1 (equals to “yes”). Perhaps this condition affects the result of your workflow.

And one more thing - in the Make a change to Payment action you are referring to the Main Container’s thing (Payment), but it can be empty. Thus, it will be better to check if the Make change action “reaches” the Main Container.

I can do nothing but suggest you test your workflow again, using different conditions and digging up for some more documentation/info:
https://manual.bubble.io/testing-an-application/using-the-debugger
https://manual.bubble.io/building-plugins/adding-api-connections
https://manual.bubble.io/using-the-bubble-api

I hope this helps :pray:
Regards,