#suiteng99

1 messages · Page 1 of 1 (latest)

topaz skiffBOT
delicate ferry
long ice
#

Now there's an uncertainty; didn't we choose three payment types? However, in the testing environment, only the payment type for the test card is being returned. It might be worth asking them if the testing environment supports only card payments.

delicate ferry
#

Can you share the example Payment Intent (pi_xxx), so that I can have a check?

bleak mountain
#

pi_3OOWmTLEuSlwG7qg17HbIFyd

long ice
#

pi_3ONtLjDKXQLPz5yO1NCb7SWP

#

This is one of the three situations they see on the backend. When customers make a payment on the client side, only one is displayed to them. This is in the testing environment.

delicate ferry
#

When customers make a payment on the client side, only one is displayed to them. This is in the testing environment.
Can you show the screenshot? In the server response, I could see these 3 payment methods are supported and they should be rendered if you're using Payment Element

bleak mountain
#

I think im doing something wrong in react

delicate ferry
#

Can you share your code?

bleak mountain
#

let elements = this.cc.current.props.elements
const {error: submitError} = await elements.submit();
if (submitError) {
// Show error to your customer
this.setState({
error: submitError.message,
loading: false,
});

        if (this.props.hasStripeErrors) {
            this.props.hasStripeErrors();
        }
        return;
    }
    
    const res = await axios.post(`/${this.props.org.url}/transaction/create_intent`, {
        contact_id: contact.id,
        client_id: contact.client_id,
        anonymous: formValues.anonymous,
        msg: formValues.msg,
        cur: this.state.cur,
        cmp_id: this.props.cmp.id,
        amount: this.state.amount,
        perk_id: this.state.perk.id,
    }).catch((error) => {
        notification.error({
            message: 'Error',
            description: 'Something went wrong. Please try again later.',
        });
        if (this.props.hasStripeErrors) {
            this.props.hasStripeErrors();
        }
    });
    // Use the clientSecret and Elements instance to confirm the setup
    const {error} = await this.cc.current.props.stripe.confirmPayment({
            elements,
            confirmParams: {
                return_url: `${window.location.origin}/${this.props.org.url}/thanks`,
                shipping: {
                    name: contact.name,
                    address: {
                      line1: contact.address,
                      city: contact.city,
                      postal_code: contact.postal,
                      state: contact.short_state,
                      country: contact.short_country,
                    },
                },
            },
    });
long ice
#

After clicking on 'Pay' now, it directly prompts for card payment without the options for FPX and Grab

bleak mountain
#

I think Im creating a PI and than re-creating one in the backend 😦

long ice
delicate ferry
#

Are both of you from the same team? The example code is in React (web), but the screenshot is in iOS

long ice
#

Can someone create another channel, this is my own channel

#

No

bleak mountain
#

Nope - this 874 is not on my team

long ice
#

Someone jumping into my conversation abruptly

bleak mountain
#

Ops maybe its me lol

#

My bad!

delicate ferry
#

@bleak mountain Please post your question in the main channel, so that we can create a thread for you

long ice
#

Sovie pls create another channel this is my own channel thanks

delicate ferry
#

@long ice Which integration do you use? iOS or React Native?

long ice
#

IOS

delicate ferry
long ice
#

It is because the url?

delicate ferry
#

Redirection payment method such as FPX requires return url to be set in order to get displayed

long ice
#

In the context of setting up the return URL in the integration, are you referring to the client-side or the server-side where the configuration needs to be done?