adyen-examples / adyen-react-online-payments

Accept payments on your React/Express-based website with cards, wallets, and key local payment methods
MIT License
66 stars 46 forks source link

How to Encrypt Card Details Using Custom Card Integration #266

Open ashrafnazar opened 6 months ago

ashrafnazar commented 6 months ago

Hi there,

I'm looking to be able to encrypt card details using an instance of AdyenCheckout, e.g.

const checkout = await AdyenCheckout({…});

checkout.create('securedfields, {…});

If I am already using

checkout.createFromAction(…)

How would this be integrated?

I'm also using a form library (Formik) to build the form which contains the card component.

Many thanks!

ashrafnazar commented 6 months ago

I've just realised that in order to do so, a container is required with correct data-cse attributes. This isn't explicitly mentioned in the docs and can be confusing. Also, when I attempt to use style the component using the paymentMethodsConfiguration property it doesn't seem to work:

paymentMethodsConfiguration: {
   card: {
    styles: {
      base: {
        color: 'blue',
        fontFamily: 'Helvetica',
        fontSmoothing: 'antialiased',
      },
    },
  },
},

Is there something missing?