stripe-archive / react-stripe-elements

Moved to stripe/react-stripe-js.
https://github.com/stripe/react-stripe-js
MIT License
3.03k stars 319 forks source link

Stripe.js V3 is a step in the wrong direction #469

Closed pxwee5 closed 4 years ago

pxwee5 commented 4 years ago

Summary

Let developers have control with their own elements. I don't see a point of using V3 elements for validation but I'm forced to use it. V3 makes integration with FE Frameworks validation libraries such a hassle and for only a few form fields.

Loading V2 and V3 together is not an option as it affects performance.

stripe.createPaymentMethod({
  type: 'card',
  card: cardElement,
  billing_details: {
    name: 'Jenny Rosen',
  },
}).then(function(result) {
  // Handle result.error or result.paymentMethod
});

Using cardElement here is IMO uncalled for. There's little security implication if we use a JS object with actual card numbers, since that is exactly what's being sent via the fetch request anyway.

pxwee5 commented 4 years ago

Closing issue due to the need for PCI Compliance.