#DankFarrik-PR-rejection
1 messages · Page 1 of 1 (latest)
What is the error you are seeing on the reject?
And what call are you making when you see it?
The payment sheets are just mentioning that the shipping address is invalid. In the case of the Pay Now sheet for example, it says that there are no valid shipping options available for the address. I'm guessing it's configured somewhere, but our server-side dev working on it is not sure where.
This screen shot is a little misleading because the international address that was selected is below the fold
but it was a valid address in Columbia
Can you get that to work for any address?
Another instance when trying to select an address in Canada
That is a form that Google developed so I am unsure if your Stripe API calls are what is causing that error
Yes we've tried multiple address, and any that are outside the US are being rejected
Same goes for Apple Pay:
Is there a Stripe-level configuration for allowed countries for payment intents?
hey
That's our server-side dev in case there's a question I can't answer ☝️
Hello! Looking in to something for another thread for a minute. Will come back with questions momentarily.
Thanks!
Can you show me your code for creating the PaymentRequest with stripe.paymentRequest?
paymentRequest = stripe.paymentRequest({
country: gu_country.toUpperCase(),
currency: 'usd',
total: {
label: 'Subtotal',
amount: 0,
pending: true
},
requestPayerName: true,
requestPayerEmail: true,
requestShipping: true
});
So I found this in our docs https://stripe.com/docs/stripe-js/elements/payment-request-button?html-or-react=html#html-js-collecting-shipping-info
Can you see if you have that snippet under "The customer must supply valid shippingOptions at this point to proceed in the flow."?
It is possible your code is doing this?
ev.updateWith({status: 'invalid_shipping_address'});
}```
function StripePRBInit () {
//init payment request button
stripePRBVis = true;
//the total and display items will be updated once the cart is created
paymentRequest = stripe.paymentRequest({
country: gu_country.toUpperCase(),
currency: 'usd',
total: {
label: 'Subtotal',
amount: 0,
pending: true
},
requestPayerName: true,
requestPayerEmail: true,
requestShipping: true
});
let prButton = elements.create('paymentRequestButton', {
paymentRequest: paymentRequest,
style: {
paymentRequestButton: {
height: '50px',
},
},
});
// Check the availability of the Payment Request API first.
paymentRequest.canMakePayment().then(function(result) {
if (result) {
prButton.mount('#payment-request-button');
//check for which method we're using to save for payment obj
if (result.applePay) {
stripeMethod = 'applepay';
}
else if (result.googlePay) {
stripeMethod = 'googlepay';
}
else {
stripeMethod = 'credit';
}
} else {
document.getElementById('payment-request-button').style.display = 'none';
}
});
}
no, it actually show success
ev.updateWith({
status: 'success',
ok we just fund the issue we thing
like you said
if (ev.shippingAddress.country !== 'US') {
ev.updateWith({status: 'invalid_shipping_address'});
}
we are gonna test
Sounds good. Please let me know
Yes we found that totally fixed our issue. That code was taken from the Payment Request button docs and wasn't noticed. Thanks for your time.