#manishuntwal

1 messages · Page 1 of 1 (latest)

wise escarpBOT
pine laurel
placid knot
#

see, I am testing the desktop web page, so when I call the confirmCashappPayment, it opens the QR code, I scan it using my mobile camera, then it open an authorize / or fail test mode page, I click on authorize, it closes the modal, but never redirect on desktop, but redirect on the mobile browser, how will mobile browser will know which user is trying it to redirect when the session is not same on both the devices

pine laurel
#

per the docs above , it is supposed to redirect on the desktop.

#

but it also says

if you don’t want to redirect after payment on web, pass redirect: if_required to the Payment Element.
do you pass that? what does your code look like?

pine laurel
#

can you show me the exact code you have written?

placid knot
#
stripe.confirmCashappPayment(
    clientSecret,
    {
      payment_method: {
        type: 'cashapp',
      },
      return_url: 'http://localhost:3000/thankyou',
    }
  );

payment intent ID: py_3NiYcdCTcD93kECp0qegxe3c

#

request body for intent creation

{
  "payment_method_types": {
    "0": "cashapp"
  },
  "capture_method": "manual",
  "metadata": {
    "solidus_order_number": "10000243"
  },
  "currency": "USD",
  "customer": "cus_OKizXuFNPFwpQ9",
  "payment_method_data": {
    "billing_details": {
      "email": "asdasd@gmail.com",
      "name": "TEST TEST"
    },
    "type": "cashapp"
  },
  "amount": "24808",
  "shipping": {
    "address": {
      "line1": "testt",
      "state": "CA",
      "city": "HAYWARD",
      "postal_code": "94545",
      "country": "US"
    },
    "name": "TEST TEST"
  }
}
pine laurel
#

what happens to the Promise returned from calling stripe.confirmCashappPayment ? does that ever resolve?
are there any errors/warning in the browser console on the desktop?

placid knot
pine laurel
#

well I see in the video that the popup closed. So that should mean the Promise resolves.

#

what does your actual code look like? what you posted above can't be the complete way the code looks, you are not doing anything with the return value of stripe.confirmCashappPayment .

placid knot
#

and the mobile browser redirects to localhost, why not the desktop getting redirected, why the mobile browser is getting redirected

#

because cashapp example is not present on the sample code, can't share that

pine laurel
#

why not the desktop getting redirected,
I don't know, that's why I'm trying to get more information from you like the exact code you're using and if there are any errors/warning in the browser console on the desktop.

placid knot
#

and ```stripe = window.Stripe("test")
stripe.confirmCashappPayment(
clientSecret,
{
payment_method: {
type: 'cashapp',
},
return_url: returnUrl,
},
).then((result) ->
if (result.error)
console.log("error")
console.log(result.error)
else
$window.location.href = returnUrl;
)

We also tried this
but the problem with this code is when stripe redirects it adds two more query parameters payment_intent, client_secret, but in our case we are not adding those in the return URL, this will redirect, but still mobile browser redirect also happening
#

with those parameters, I feel if the desktop get redirected rather than mobile it will solve all of our issues

pine laurel
#

to clarify does the function from then((result) -> ever get called?

but the problem with this code is when stripe redirects it adds two more query parameters payment_intent, client_secret, but in our case we are not adding those in the return URL, this will redirect, but still mobile browser redirect also happening
I'm afraid I don't quite understand this, could you explain it in another way?

placid knot
#

We did two other payment method custom integrations affirm and afterpay_clearpay,
usually stripe redirects back to our website when we authorize the payment on the same return URL with two more query parameters on the same device those two parameters' names are payment_intent which contains the payment intent ID, second parameter is client_secret, which is the payment intent client secret field

this helps us to check if the payment went through or not, in mobile browser These parameters are present

I am saying if it could redirect to the desktop then it would resolve our issue

if we do the manual redirect using the promise resolver we explicitly need to add those parameters!

pine laurel
#

I see.

#

ultimately, as far as I know, the desktop redirect is supposed to happen. If you're saying it's not, I don't know why not, it would require a deeper investigation via a support ticket (https://support.stripe.com/?contact=true), with the complete details of all your code and multiple examples, and ideally a link to your payment page in test mode where we could try to replicate the issue on our browsers too.

placid knot
#

thanks let me open a ticket, whats the SLA for these tickets?

pine laurel
wise escarpBOT