#wesleympg_unexpected
1 messages Β· Page 1 of 1 (latest)
π Welcome to your new thread!
β²οΈ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
β±οΈ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
π This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1350053915936296991
π Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- wesleympg_unexpected, 16 hours ago, 3 messages
I sent this yesterday, but I did't get the reply notification and the thread was closed, sorry about that.
Hi there π you don't get feedback about why a wallet isn't available from canMakePayment. You'd have to review the common reasons for them to not be surfaced. Do you have a publicly accessible testsite where I can see this integration and poke around?
Sure, just a second
Click on enter auction, chosse Avianca as airline, put this on booking code 9900100101, and fill the other fields as you please
oh, Sorry this environment seems to be under some issue
whoops I actually passed a bad booking code
99001001 this one is correct
Do you have credentials I can use to get past the email form?
Sure
Just use my link, it will expire in a few minutes https://stage-www.seatboost.app/verify?email=wesley%40quimbik.com&exp=1742034948&s=pml4bq6VFjy2x0Pbo7kYTzB%2FmmrFJqbKYwE6UoSckq4%3D
you can select any flight to reach this screen. Then select instant purchase and you go to the payment section
One thing standing out to me is that this domain isn't registered for your Stripe account.
We changed the account on Monday trying to check if it was the problem
It does look like Google Pay is enabled in the Payment Method Configuration for this account, so I don't suspect that to be a problem.
I'll add the domain
I may be missing it since the code on this site is heavily minified, but I'm not spotting a line to create a Payment Request Button.
we are directly calling paymentRequest.show()
I mean we have a Google Pay button showing up depending on canMakePayment response
Do you see Google Pay shown here? That'll help confirm whether your device is set up as we're expecting, so we know whether we're looking for a device issue or an integration issue.
https://docs.stripe.com/testing/wallets?ui=payment-request-button-element
yes
We actually added the ExpressCheckoutElement as a way of debugging and we were able to see the Google Pay button there
Hm, sounds like an integration concern then.
π taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
So, you are the one checking my problem from now on?
Can you share your code for this?
Sure
useEffect(() => {
const createPaymentRequest = async () => {
if (createPaymentRequestCount.current >= maxCreatePaymentRequestRetry)
return;
if (!stripe || paymentRequest) return;
const toDisable = type == 'googlePay' ? 'applePay' : 'googlePay';
const pr = stripe.paymentRequest({
country: 'US',
currency: paymentInfo.currency.toLocaleLowerCase(),
total: {
label: paymentInfo.description,
amount: paymentInfo.amount,
},
requestPayerName: true,
requestPayerEmail: true,
requestPayerPhone: false,
requestShipping: false,
disableWallets: ['link', toDisable],
applePay: {},
displayItems: paymentInfo.summaryItems,
});
try {
const result = await pr.canMakePayment();
if (result && result[type]) {
setPaymentRequest(pr);
onPaymentAvailable();
pr.on('paymentmethod', (event) => {
event.complete('success');
onPayment(event.paymentMethod);
});
} else {
createPaymentRequestCount.current++;
}
} catch (error) {
console.error('Error in canMakePayment:', error);
}
};
createPaymentRequest();
}, [
onPayment,
onPaymentAvailable,
paymentInfo,
paymentRequest,
stripe,
type,
]);
This integration also is about Apple Pay but it's working properly since we figured out we were missing the domain association files
will take a look give me a couple of minutes please
No problem. onPaymentAvailable() only sets true a flag to show the wallet section if any of them is available
I'm just trying to wrap my head around this
why are you using the PRB and the ECE? you should migrate to ECE anyways
This is on top of other apps. We have mobile apps for years now and we created this web app on top of this old flow
are you using this in a webview on a mobile app?
I'm not sure because I did't work on them but they don't use stripe elements
my question is more about where are you using the PRB?
for a website or inside the mobile app using a webview?
website
ok
in that case you should migrate to the ECE https://docs.stripe.com/elements/express-checkout-element/migration
For what I could understand we are using this approach rather ECE is because our server handles the PaymentIntent related stuff and in the apps we just need to generate a payment source.
you can do that as well with the ECE
you can create a confirmation token https://docs.stripe.com/elements/express-checkout-element/accept-a-payment#create-ct
and then you can send it to the backend which can use it to confirm the Payment Intent
I will present the alternative to my boss. Do you have some clue about what we did wrong in this approach?
why are you manually disabling Apple Pay and Google Pay
normally you shouldn't see both
Yeah but we needed to make sure to have the option to disable it manually
I really recommend you start by replacing this with the ECE and once it's there we can take a look whether it's functioning or still causing issues
can you create a new link and send it to me so I could check why the issue is still there in the meantime?
and you want me to check google pay or apple pay?
Google Pay. Apple Pay is working
this one I mean
I'm testing from latest Chrome from my PC, but also tested in different Android devices with Google Pay wallet set up
the link is working
I meant which country?
ok but it's not working for me it's redirecting me to https://stage-www.seatboost.app
Just a second then
thanks and take your time
so you are redirected to that URL but you are not logged in?
You should be redirected logged in
I am logged in
oh
but where can I test the PRB?
Click on enter auction, chosse Avianca as airline, put this on booking code 99001001, and fill the other fields as you please
select a flight, click continue, choose Instant upgrade purchase and continue again
Above the card element should be the wallet buttons
But as Google Pay is not available, it's empty
I can't find the createPaymentRequest in your source code
just a second
Okay
the paymentRequest.canMakePayment() is returning null
Yes
we directly call paymentRequest.show()
paymentRequest: paymentRequest,
});
paymentRequestButton.mount("#payment-request-button");
We call paymentRequest.show()
you're somehow disabling GooglePay as well
We have a button for Apple Pay and other for Google Pay
is the same button but we disable the other one
We can fix that, but removing the apple pay button also didn't solve this
if you're sticking with PRB you should only use one https://docs.stripe.com/stripe-js/elements/payment-request-button
and do this const elements = stripe.elements(); const prButton = elements.create('paymentRequestButton', { paymentRequest, });
you need to review the way you're implementing this
We tried removing Apple Pay and letting just Google Pay but it also didn't fix the problem
I think what you should do is the following
on the main page add the code from the link I sent you just for testing
without the cards element
just the PRB
and let's test it there
Okay
once you do please ping @cosmic plinth who will take over from there
Sure
@cosmic plinth I can see the Link payment button but still no Google Pay
Hi. I'm taking over from my colleague. Please, give me a moment to catch up.
Could you please share a screenshot?
And could you please share steps to reproduce the issue?
Or share the link ou have there?
I did't push this changes to the stage environment but I could do it, but if you can easily open chrome with --disable-web-security (needed to avoid CORS issues) I could send you this link which is running on my machine
So, which one?
Could you send me the local link?
Click on enter auction, chosse Avianca as airline, put this on booking code 99001001, and fill the other fields as you please
select a flight, click continue, choose Instant upgrade purchase and continue again
Ok, still running into issues. I guess it will be easier if you deploy on staging.
I will need to step away. I actually think it makes more sense to turn this into a support case, since this coversation was going on for a while. This way we won't loose context:
Hello @junior kite, we have sent you a direct message, please check it at https://discord.com/channels/@me/1350091156750467247
- πThe message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
Okay