App icon indicating copy to clipboard operation
App copied to clipboard

Update Payment flow on clicking `Pay`

Open madmax330 opened this issue 1 year ago • 23 comments

Part of the <Project Name> project

Main issue: https://github.com/Expensify/Expensify/issues/382977 Doc section: https://docs.google.com/document/d/1CF5gw-SJx7ckZCgTJNj1IqBnsRuSxD2Bfd_uB5rRGxk/edit#heading=h.u0rlixqcmug6 Project: https://github.com/orgs/Expensify/projects/114

Feature Description

Relevant doc section: https://docs.google.com/document/d/1CF5gw-SJx7ckZCgTJNj1IqBnsRuSxD2Bfd_uB5rRGxk/edit#heading=h.jxlg73mn39np

Manual Test Steps

Create an invoice, as the receiver click on pay and make sure the different dialogs work correctly.

Automated Tests

Issue OwnerCurrent Issue Owner: @rezkiy37

madmax330 avatar Jul 10 '24 15:07 madmax330

We might want to split this one up into different PRs for each of the different payment methods

madmax330 avatar Jul 10 '24 15:07 madmax330

@madmax330 any updates on this one? We'll probably have to make some progress to hit SuiteWorld, not sure if it's been tracked somewhere else.

danielrvidal avatar Aug 27 '24 21:08 danielrvidal

Going to work on it this week, I think it's holding on some backend changes

madmax330 avatar Sep 02 '24 12:09 madmax330

Changing to weekly so I can get this done

madmax330 avatar Oct 07 '24 09:10 madmax330

Hi, I am Michael (Mykhailo) from Callstack, an expert agency and I can work on this issue.

rezkiy37 avatar Oct 10 '24 09:10 rezkiy37

Actively working on the issue.

rezkiy37 avatar Oct 11 '24 11:10 rezkiy37

Not overdue

madmax330 avatar Oct 16 '24 13:10 madmax330

Still working on the Auth part

madmax330 avatar Oct 29 '24 14:10 madmax330

I am OOO till Tuesday and will continue to work on this issue later.

rezkiy37 avatar Oct 31 '24 18:10 rezkiy37

Waiting for the backend.

rezkiy37 avatar Nov 06 '24 12:11 rezkiy37

Waiting for the backend.

rezkiy37 avatar Nov 14 '24 16:11 rezkiy37

No updates. We are waiting on the backend.

rezkiy37 avatar Nov 18 '24 17:11 rezkiy37

backend changes are still WIP.

cristipaval avatar Nov 28 '24 09:11 cristipaval

The backend PR is ready for review.

cristipaval avatar Dec 02 '24 21:12 cristipaval

Has it not been deployed to the staging server yet? If not, should it be there after the merge?

rezkiy37 avatar Dec 03 '24 08:12 rezkiy37

I'll keep you posted when the backend PR hits staging

cristipaval avatar Dec 03 '24 09:12 cristipaval

@rezkiy37, the backend changes are in staging.

cristipaval avatar Dec 06 '24 09:12 cristipaval

I always get the 403 error. Was the API updated?

Screenshots

Screenshot 2024-12-06 at 16 10 39 Screenshot 2024-12-06 at 16 10 32

cc @cristipaval

rezkiy37 avatar Dec 06 '24 15:12 rezkiy37

@rezkiy37 , the payment type has to be "Expensify", not ACH

cristipaval avatar Dec 06 '24 16:12 cristipaval

@cristipaval, it throws "404 Stripe customerID does not exist".

Screenshots

Screenshot 2024-12-09 at 11 24 11 Screenshot 2024-12-09 at 11 24 03

rezkiy37 avatar Dec 09 '24 10:12 rezkiy37

@rezkiy37 What bank account did you use, and how did you set it up on your account?

cristipaval avatar Dec 09 '24 10:12 cristipaval

@cristipaval I've used those 2 bank accounts I added quite a long time ago. As I remember I added them in the sandbox mode. So probably they are not real.

Screenshots

Screenshot 2024-12-09 at 13 07 36 Screenshot 2024-12-09 at 13 08 43 Screenshot 2024-12-09 at 13 08 47

Do you know how I can test the payment?

rezkiy37 avatar Dec 09 '24 12:12 rezkiy37

Could you please try adding a new bank account? Or maybe delete the current one you have and re-add it.

cristipaval avatar Dec 09 '24 12:12 cristipaval

Testing it.

rezkiy37 avatar Dec 10 '24 18:12 rezkiy37

I've added a new bank account for a new user. However, I still have the error. Important: I can only use sandbox bank accounts, not real ones. So I am on the staging server with the mock accounts. I think we are good to continue with the PR Since we verified the payload the app sends. Let's open the PR and ask QA to test it with the real bank accounts. @cristipaval WDYT?

Screenshots

Screenshot 2024-12-12 at 13 37 09 Screenshot 2024-12-12 at 13 36 40

rezkiy37 avatar Dec 12 '24 12:12 rezkiy37

I've added a new bank account for a new user. However, I still have the error. Important: I can only use sandbox bank accounts, not real ones. So I am on the staging server with the mock accounts. I think we are good to continue with the PR Since we verified the payload the app sends. Let's open the PR and ask QA to test it with the real bank accounts. @cristipaval WDYT?

Screenshots

I setup my local environment to test payments with Expensify. I'll test your PR today and let you know.

cristipaval avatar Dec 16 '24 17:12 cristipaval

Hi! I am writing to let you know about my upcoming vacation until the 7th Tuesday of January. I will resume my work on the issue when I get back.

Wishing you a Happy New Year!

rezkiy37 avatar Dec 28 '24 11:12 rezkiy37

Just had a chat with @madmax330 and we chatted about the error that is thrown from the backend.

cristipaval avatar Jan 09 '25 10:01 cristipaval

Posting here for me whenever I have time to work again on this:

  • We currently throw here when the payer has no Stripe customer ID
  • We need to check in peek() whether the payer has that ID and create it when they don't, using the Stripe::createCustomer function from Stripe.cpp.

cristipaval avatar Jan 09 '25 10:01 cristipaval

Calm down, Melv

cristipaval avatar Jan 09 '25 10:01 cristipaval