#DankFarrik-PR-rejection

1 messages · Page 1 of 1 (latest)

iron otter
#

What is the error you are seeing on the reject?

#

And what call are you making when you see it?

cloud island
#

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

iron otter
#

Can you get that to work for any address?

cloud island
#

Another instance when trying to select an address in Canada

iron otter
#

That is a form that Google developed so I am unsure if your Stripe API calls are what is causing that error

cloud island
#

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?

gusty sparrow
#

hey

cloud island
#

That's our server-side dev in case there's a question I can't answer ☝️

iron otter
#

Hello! Looking in to something for another thread for a minute. Will come back with questions momentarily.

cloud island
#

Thanks!

iron otter
#

Can you show me your code for creating the PaymentRequest with stripe.paymentRequest?

gusty sparrow
#

paymentRequest = stripe.paymentRequest({
country: gu_country.toUpperCase(),
currency: 'usd',
total: {
label: 'Subtotal',
amount: 0,
pending: true
},
requestPayerName: true,
requestPayerEmail: true,
requestShipping: true
});

iron otter
#

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'});
 }```
gusty sparrow
#

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

iron otter
#

Sounds good. Please let me know

cloud island
#

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.