#brandontrytn

1 messages · Page 1 of 1 (latest)

oak mantleBOT
river wagon
#

That should work

#

Can you share your code?

sour flume
#

sure, here's the bulk of it:

        const model = toPaymentConfirmedRedirectRequest();
        const returnUrl = `${settings.domain}/${window.globalSettings.culture}/${window.globalSettings.shop.shopUrl}/Pay/PaymentConfirmedRedirect?${JSON.stringify(model)}`;

        stripe.confirmPayment({
            elements: elements,
            confirmParams: {
                payment_method_data: {
                    billing_details: {
                        address: {
                            country: settings.fields.$country.val()
                        }
                    }
                },
                return_url: returnUrl
            },
            redirect: 'if_required'
        }).then(wasPaymentConfirmed);

and then what generates the model:

export function toPaymentConfirmedRedirectRequest() {
    return {
        BillTo: {
            Country: window.trytnJQuery('#BillTo_Country').val()
        },
        CartId: window.trytnJQuery('#CartId').val(),
        Culture: window.trytnJQuery('#Culture').val(),
        MarketingOptIn: window.trytnJQuery('#MarketingOptIn').is(':checked'),
        PaymentToken: window.trytnJQuery('#PaymentToken').val()
    };
}
#

according to my logs when the PaymentConfirmedRedirect endpoint is hit on my side everything is blank, but logging just before that call I do see everything exists on the firm

river wagon
#

Can you console.log returnUrl just prior to calling stripe.confirmPayment?

sour flume
#

in my logs I log the returnurl and it is as I would expect, so sending off to stripe it has the data, but when stripe calls the endpoint it does not

river wagon
#

Can you share an example payment intent id?

sour flume
#

sure, this one hit stripe but came back without the params: pi_3NQxZVEkLiDpEb6j0YjFevXL

river wagon
#

Yeah we received a bunch of params with that PI. Do you have a test site I can reproduce this on?

sour flume
#

the issue is because it doesn't redirect back to us with the params the customer gets a charge in stripe but no record is created on our end

#

are you able to share the url that you hit on that request so I can look to see if anything is amiss that I can see on the url?

#

meaning the redirect url that was called

river wagon
#

Yes give me a minute

sour flume
#

ty

river wagon
#

What's the easiest way to checkout

sour flume
#

you can pick any product, add to cart, the "no questions" or "tour ticket" products are probably fastest

#

it's a test account so any duymmy data and test card will work

#

oh and can you confirm you're making a GET request to the redirect url? or is it a POST?

river wagon
#

Stripe does a GET always for return_url

#

Do see 1 query param

sour flume
#

and the return url that was called when you placed that test booking?

river wagon
#

That's where I was redirected after paying

sour flume
#

no, we only redirect if required, so we'd need a test where it requires the redirect to take place from stripe

#

should look something like /pay/paymentconfirmedredirect?{params}

#

on a side note, are you able to provide a test card number that requires the redirect?

river wagon
#

No redirect based payment methods are showing for me

#

AFAIK there's not a test card that redirects

#

You'd need to use a redirect based payment method then

sour flume
#

which require redirects?

#

perhaps I can activate one in our test account

#

if they are the "bank redirect" payment methods we have all but 2 turned on (24 and sofort)

river wagon
#

Only seeing card

#

So the other thing here is are you using Connect accounts?

sour flume
#

correct

river wagon
#

That can also determine which pm's show up

#

If you use direct charges, then the pm's of the connect accounts will show. Not those on the platform

sour flume
#

we have to use connect accounts given our platform

#

for the pi_ I sent over earlier, are you able to send me the redirect url that you called?

river wagon
#

Although it is a connect request, so you may not have access

#

I can send the link directly as long as you're ok with it. I have no idea if any of the params are sensitive

sour flume
#

I believe I have access, checking now

#

I have access to that link, ty

sour flume
#

don't see anything wrong with what was sent over. super strange. going to play with some things on my end and may be back if I find more strange things

river wagon
#

Sure thing