#jack_71068

1 messages · Page 1 of 1 (latest)

mossy oracleBOT
modest gale
spring sinew
#

req_FVtOoQftI5BlNw

#

That's in the sandbox.

modest gale
#

Okay, so just so I'm clear, you are using the ECE to create Payment Methods? And then you attempt to charge them separately?

spring sinew
#

We use the front end Stripe SDK to initiate the payment, but that then passes the payment method id to our server so we can put the payment through in server side code.

modest gale
#

What flow are you using here? Is it the deferred intents flow?

spring sinew
#

It's express checkout elements. Is that what you mean?

modest gale
#

Can you share the JavaScript code you are using to create the Express Checkout Element and payment Method?

short skiff
#
var generateExpressCheckoutElement = function () {

        var appearance = {
            theme: 'stripe',
            variables: {
                borderRadius: '36px',
            }
        };

        var expressCheckoutOptions = {
            buttonHeight: 40,
            buttonTheme: {
                // applePay: 'white-outline'
            },
            buttonType: {
                applePay: 'buy',
                googlePay: 'buy',
                paypal: 'buynow'
            }
        }

        elements = stripe.elements({
            locale: 'en',
            mode: 'payment',
            amount: StripeExpressCheckoutElementsService.getTotalToPay(),
            currency: StripeExpressCheckoutElementsService.getSelectedCurrency().code.toLowerCase(),
            appearance: appearance,
            paymentMethodCreation: 'manual'
        });
        
        expressCheckoutElement = elements.create(
            'expressCheckout',
            expressCheckoutOptions
        );
        
        expressCheckoutElement.mount('.payment-method-stripe-express-checkout-elements');
    
    }
spring sinew
#

Pink Panda is my colleague by the way.

modest gale
#

And what payment method data are you using for this test?

spring sinew
#

One of the Stripe test cards. I think it's 4242424242424242. It's saved in my account so I'm not entering it every time.

#

Is there a specific card I should be using for Link tests?

modest gale
#

No that should be fine

spring sinew
#

Thanks. So I need to send a mandate object in the payment intent creation I'm doing on the server. I'm unclear as to whether I need to change anything on the front end. It says the setting on the front end for if terms are shown is auto. Should I force that to Always for Link? Link isn't listed in the examples, but I assume it's the same format as the others that are shown.

modest gale
#

You need to send the mandate data back from the front-end because that is where you can collect the IP address and user-agent from the user's browser session