#negative10xprogrammer

1 messages · Page 1 of 1 (latest)

zenith iglooBOT
jade comet
#

Can you share more details about your integration ?

#

Can you share a PaymentIntent Id ?

hoary yarrow
#

this is the code I have :

CheckoutForm.js

import React from 'react';
import { PaymentElement } from '@stripe/react-stripe-js';

const CheckoutForm = () => {
    return (
        <form>
            <PaymentElement />
            <button>Submit</button>
        </form>
    );
};

export default CheckoutForm;

and index.js

import React from 'react';
import ReactDOM from 'react-dom';
import { Elements } from '@stripe/react-stripe-js';
import { loadStripe } from '@stripe/stripe-js';

import CheckoutForm from './CheckoutForm';

// Make sure to call `loadStripe` outside of a component’s render to avoid
// recreating the `Stripe` object on every render.
const stripePromise = loadStripe('pk_test_51N0LqFK8v32HmraZlMkljiLm2bJY4aj5oNreVbAK6m9w3BpoWlUCAIkLUWEhUtYg0ucw90zvIh4EqVq5KEI8yJC3007HkfI3sM');

function App() {
    const options = {
        mode: 'payment',
        amount: 1099,
        currency: 'usd',
        // Fully customizable with appearance API.
        appearance: {/*...*/ },
    };

    return (
        <Elements stripe={stripePromise} options={options}>
            <CheckoutForm />
        </Elements>
    );
};

ReactDOM.render(<App />, document.getElementById('root'));
jade comet
#

Can you share a screenshot of this output

hoary yarrow
jade comet
#

Do you have other payment method activated in your account ?

hoary yarrow
#

yes ok so i turned on klarna, but it doesnt show up yet

#

surely it goes off the api key?

#

it's the publishable key, no?

jade comet
#

Can you share your accountId ?

hoary yarrow
#

acct_1N0LqFK8v32HmraZ

jade comet
#

Your account is based is Sweden, use eur currency.

hoary yarrow
#

oh lol, thanks man

#

just one question

#

why doesnt sweden show up as an alternative when i select country in the klarna menu?

jade comet
#

What Klarna menu ? is this in Stripe Dashboard? can you share a screenshot ?

hoary yarrow
#

ah it's because i changedto eur

#

so i'm guessing that currency should nto be a hard coded value

#

but rather the users preference upon entering the site

jade comet
#

Sorry, I'm not sure I understand your latest messages .

hoary yarrow
#

no problem. I just have two more questions:

if I pick usd, why isn't klarna showing up when it says

Supported currencies AUD, CAD, CHF, CZK, EUR, GBP, DKK, NOK, NZD, PLN, SEK, USD

Second... how do i turn off payments? i turned some on but there doesnt seem to be an off button lol

#

for example for cartes bancaires

jade comet
#

if I pick usd, why isn't klarna showing up when it says

Supported currencies AUD, CAD, CHF, CZK, EUR, GBP, DKK, NOK, NZD, PLN, SEK, USD
That's depending on your account location and account currency also:
https://stripe.com/docs/payments/klarna
In order to accept USD with Klarna your account need to be in US

#

Second... how do i turn off payments? i turned some on but there doesnt seem to be an off button lol
for example for cartes bancaires
You can't disable credit card from the dashboard

hoary yarrow
#

ah ok

#

anyway thanks a lot 😄

jade comet