Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment Requests with Zero Value on Repeated Payment Attempts #158

Open
SmoothPlay opened this issue Jun 26, 2024 · 1 comment
Open

Payment Requests with Zero Value on Repeated Payment Attempts #158

SmoothPlay opened this issue Jun 26, 2024 · 1 comment

Comments

@SmoothPlay
Copy link

Description:
When a customer initiates a payment through the Frappe Payments app integrated with GoCardless, everything functions correctly on the first attempt. The customer is redirected to the GoCardless payment page, and the correct amount is shown for payment.

However, if the customer navigates away from the GoCardless payment page and then clicks the Pay button again, a new Payment Request is created with a value of 0.00. This results in two different payment requests: one with the correct value and another with a value of 0.00. The Sales Order is left in the "To Pay" state.

Steps to Reproduce:

Create a Sales Order in the Frappe Payments app.
Click the Pay button to initiate payment through GoCardless.
On the GoCardless payment page, navigate away or close the page.
Return to the Frappe Payments app and click the Pay button again.

Expected Behavior:

If the customer clicks the Pay button again, the existing Payment Request should be used, or a new Payment Request should be created with the correct value from the Sales Order.

Actual Behavior:

A new Payment Request is created with a value of 0.00, resulting in two Payment Requests: one with the correct value and another with 0.00.

Environment:

Payments app version: Latest (dev)
Webshop: Latest (dev)
Erpnext: v16.0.0-dev
Frappe: v16.0.0-dev
Browser: Brave Browser

Possible Fixes:

Ensure that the value from the Sales Order is correctly fetched and applied to any new Payment Request.
Check if an existing Payment Request can be reused instead of creating a new one.
Additional Context:

This issue disrupts the payment process and could lead to customer confusion and failed payments.

@SmoothPlay
Copy link
Author

As a side note, I wonder... shouldn't the Sales Order be always "To Pay" from the beginning until the costumer pays?

The current behavior is that when the sales order is generated it starts as " To Deliver and Bill ". Which should only happen after the client pays I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant