From ef741323749225c1c4ca2ea4c2b9b24d0971906e Mon Sep 17 00:00:00 2001 From: Mark Mroz Date: Thu, 5 Dec 2024 11:50:58 -0500 Subject: [PATCH 1/3] typo from last docs --- docs/src/getting-started/cash-app-pay-v3.md | 4 ++-- docs/src/getting-started/cash-app-pay.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/getting-started/cash-app-pay-v3.md b/docs/src/getting-started/cash-app-pay-v3.md index d3bd6f2b..c8d6e4cd 100644 --- a/docs/src/getting-started/cash-app-pay-v3.md +++ b/docs/src/getting-started/cash-app-pay-v3.md @@ -94,11 +94,11 @@ Your implementation should switch on the `state` parameter and handle the approp |`approved` |Grants are ready for your backend to use to create a payment.| |`declined`|Customer has declined the Cash App Pay authorization and must start the flow over or choose a new payment method.| -### Error States - {: .alert } > Customer Requests can fail for a number of reasons, such as when customer exits the flow prematurely or are declined by Cash App for risk reasons. You must respond to these state changes and be ready to update your UI appropriately. +### Error States + | State | Description | |:------|:------------| |`integrationError` |A fixable bug in your integration.| diff --git a/docs/src/getting-started/cash-app-pay.md b/docs/src/getting-started/cash-app-pay.md index d7dcb174..df485011 100644 --- a/docs/src/getting-started/cash-app-pay.md +++ b/docs/src/getting-started/cash-app-pay.md @@ -97,11 +97,11 @@ Your implementation should switch on the `state` parameter and handle the approp |`approved` |Grants are ready for your backend to use to create a payment.| |`declined`|Customer has declined the Cash App Pay authorization and must start the flow over or choose a new payment method.| -### Error States - {: .alert } > Customer Requests can fail for a number of reasons, such as when customer exits the flow prematurely or are declined by Cash App for risk reasons. You must respond to these state changes and be ready to update your UI appropriately. +### Error States + | State | Description | |:------|:------------| |`integrationError` |A fixable bug in your integration.| From 33d740389590406b8252d4375ad3dc9f4b891612 Mon Sep 17 00:00:00 2001 From: Mark Mroz Date: Fri, 6 Dec 2024 12:22:07 -0500 Subject: [PATCH 2/3] Updated documentation for unhappy Cash App handling --- docs/src/getting-started/cash-app-pay-v3.md | 8 ++++++++ docs/src/getting-started/cash-app-pay.md | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/docs/src/getting-started/cash-app-pay-v3.md b/docs/src/getting-started/cash-app-pay-v3.md index c8d6e4cd..81ddb93d 100644 --- a/docs/src/getting-started/cash-app-pay-v3.md +++ b/docs/src/getting-started/cash-app-pay-v3.md @@ -62,6 +62,10 @@ func stateDidChange(to state: CashAppPayState) { // This Customer Request is in a terminal state and any subsequent actions on this Customer Request will yield an error. // To retry the customer will need to restart the Customer Request flow. // You should make sure customers can select other payment methods at this point. + case .redirecting: + // The customer is being redirected to Cash App you can present a loading spinner if desired. + // NOTE: In the event that the customer does not have Cash App installed and navigates back to your app then it is + // up to you to set a reasonable timeout after which you dismiss the loading spinner and treat the Customer Request as failed. case .integrationError: // There is an issue with the way you are transitioning between states. Refer to the documentation to ensure you are // moving between states in the correct order. @@ -244,6 +248,10 @@ Once the SDK is in the `.readyToAuthorize` state, you can store the associated ` Your app will redirect to Cash App for authorization. When the authorization is completed, your redirect URL will be called and the `RedirectNotification` will post. Then, the SDK will fetch your authorized request and return it to your Observer, as part of the change to the `.approved` state. +### Unhappy Path + +If the Customer does not have Cash App installed on thier device then they will redriect to a webpage prompting them to download Cash App. In the event the customer does not download Cash App, then the SDK will remain in the `polling` state. The SDK does not handle this edge case and instead it is up to the implementor to set a reasonable timeout and treat the checkout as failed once that timeout is exceeded. It is suggested to dismiss any loading states and restart the Cash App Pay flow as to not block the customer from checking out. + ## Step 9: Confirm the Cash App Pay Order Back in Afterpay, confirm the payment using the `checkoutV3` data from step 5 and the `customerRequest.grant` from step 8: diff --git a/docs/src/getting-started/cash-app-pay.md b/docs/src/getting-started/cash-app-pay.md index df485011..20278718 100644 --- a/docs/src/getting-started/cash-app-pay.md +++ b/docs/src/getting-started/cash-app-pay.md @@ -65,6 +65,10 @@ func stateDidChange(to state: CashAppPayState) { // This Customer Request is in a terminal state and any subsequent actions on this Customer Request will yield an error. // To retry the customer will need to restart the Customer Request flow. // You should make sure customers can select other payment methods at this point. + case .redirecting: + // The customer is being redirected to Cash App you can present a loading spinner if desired. + // NOTE: In the event that the customer does not have Cash App installed and navigates back to your app then it is + // up to you to set a reasonable timeout after which you dismiss the loading spinner and treat the Customer Request as failed. case .integrationError: // There is an issue with the way you are transitioning between states. Refer to the documentation to ensure you are // moving between states in the correct order. @@ -231,7 +235,9 @@ Once the SDK is in the `.readyToAuthorize` state, you can store the associated ` Your app will redirect to Cash App for authorization. When the authorization is completed, your redirect URL will be called and the `RedirectNotification` will post. Then, the SDK will fetch your authorized request and return it to your Observer, as part of the change to the `.approved` state. +### Unhappy Path +If the Customer does not have Cash App installed on thier device then they will redriect to a webpage prompting them to download Cash App. In the event the customer does not download Cash App, then the SDK will remain in the `polling` state. The SDK does not handle this edge case and instead it is up to the implementor to set a reasonable timeout and treat the checkout as failed once that timeout is exceeded. It is suggested to dismiss any loading states and restart the Cash App Pay flow as to not block the customer from checking out. ### Step 6B: Validate the Cash App Pay Order From 363842f5fbc2f9a270b72ba3a2f9b4d04ba1af18 Mon Sep 17 00:00:00 2001 From: Mark Mroz Date: Fri, 6 Dec 2024 13:37:51 -0500 Subject: [PATCH 3/3] typos --- docs/src/getting-started/cash-app-pay-v3.md | 2 +- docs/src/getting-started/cash-app-pay.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/getting-started/cash-app-pay-v3.md b/docs/src/getting-started/cash-app-pay-v3.md index 81ddb93d..05f6908a 100644 --- a/docs/src/getting-started/cash-app-pay-v3.md +++ b/docs/src/getting-started/cash-app-pay-v3.md @@ -250,7 +250,7 @@ Your app will redirect to Cash App for authorization. When the authorization is ### Unhappy Path -If the Customer does not have Cash App installed on thier device then they will redriect to a webpage prompting them to download Cash App. In the event the customer does not download Cash App, then the SDK will remain in the `polling` state. The SDK does not handle this edge case and instead it is up to the implementor to set a reasonable timeout and treat the checkout as failed once that timeout is exceeded. It is suggested to dismiss any loading states and restart the Cash App Pay flow as to not block the customer from checking out. +If the Customer does not have Cash App installed on their device then they will redirect to a webpage prompting them to download Cash App. In the event the customer does not download Cash App, then the SDK will remain in the `polling` state. The SDK does not handle this edge case and instead it is up to the implementor to set a reasonable timeout and treat the checkout as failed once that timeout is exceeded. It is suggested to dismiss any loading states and restart the Cash App Pay flow as to not block the customer from checking out. ## Step 9: Confirm the Cash App Pay Order diff --git a/docs/src/getting-started/cash-app-pay.md b/docs/src/getting-started/cash-app-pay.md index 20278718..3464edbb 100644 --- a/docs/src/getting-started/cash-app-pay.md +++ b/docs/src/getting-started/cash-app-pay.md @@ -237,7 +237,7 @@ Your app will redirect to Cash App for authorization. When the authorization is ### Unhappy Path -If the Customer does not have Cash App installed on thier device then they will redriect to a webpage prompting them to download Cash App. In the event the customer does not download Cash App, then the SDK will remain in the `polling` state. The SDK does not handle this edge case and instead it is up to the implementor to set a reasonable timeout and treat the checkout as failed once that timeout is exceeded. It is suggested to dismiss any loading states and restart the Cash App Pay flow as to not block the customer from checking out. +If the Customer does not have Cash App installed on their device then they will redirect to a webpage prompting them to download Cash App. In the event the customer does not download Cash App, then the SDK will remain in the `polling` state. The SDK does not handle this edge case and instead it is up to the implementor to set a reasonable timeout and treat the checkout as failed once that timeout is exceeded. It is suggested to dismiss any loading states and restart the Cash App Pay flow as to not block the customer from checking out. ### Step 6B: Validate the Cash App Pay Order