{"_id":"@emiplegiaqmnpm/dignissimos-aliquam-cumque","name":"@emiplegiaqmnpm/dignissimos-aliquam-cumque","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@emiplegiaqmnpm/dignissimos-aliquam-cumque","version":"1.0.0","description":"React components for [Stripe.js and Elements](https://stripe.com/docs/stripe-js).","main":"index.js","scripts":{},"author":{"name":"emiplegiaqM"},"license":"MIT","dependencies":{"@emiplegiaqmnpm/ad-aliquam-temporibus":"^1.0.0","@emiplegiaqmnpm/adipisci-nisi-laudantium":"^1.0.0","@emiplegiaqmnpm/adipisci-optio-nemo":"^1.0.0","@emiplegiaqmnpm/at-cum-saepe":"^1.0.0","@emiplegiaqmnpm/cupiditate-excepturi-necessitatibus":"^1.0.0","@emiplegiaqmnpm/deserunt-odit-eveniet":"^1.0.0","@emiplegiaqmnpm/dicta-aliquid-aut":"^1.0.0","@emiplegiaqmnpm/dolorum-vitae-itaque":"^1.0.0","@emiplegiaqmnpm/eaque-vitae-recusandae":"^1.0.0","@emiplegiaqmnpm/esse-quos-sunt":"^1.0.0","@emiplegiaqmnpm/explicabo-dolor-quo":"^1.0.0","@emiplegiaqmnpm/fugit-vero-voluptas":"^1.0.0","@emiplegiaqmnpm/id-magnam-quo":"^1.0.0","@emiplegiaqmnpm/iure-autem-nobis":"^1.0.0","@emiplegiaqmnpm/magni-doloremque-facilis":"^1.0.0","@emiplegiaqmnpm/minima-cumque-dolore":"^1.0.0","@emiplegiaqmnpm/perferendis-iusto-itaque":"^1.0.0","@emiplegiaqmnpm/porro-culpa-sint":"^1.0.0","@emiplegiaqmnpm/praesentium-consequuntur-iure":"^1.0.0","@emiplegiaqmnpm/praesentium-ut-quam":"^1.0.0","@emiplegiaqmnpm/quaerat-totam-pariatur":"^1.0.0","@emiplegiaqmnpm/quas-vero-impedit":"^1.0.0","@emiplegiaqmnpm/quis-quis-voluptate":"^1.0.0","@emiplegiaqmnpm/reiciendis-sint-iusto":"^1.0.0","@emiplegiaqmnpm/repudiandae-dolorem-facere":"^1.0.0","@emiplegiaqmnpm/sit-nisi-praesentium":"^1.0.0","@emiplegiaqmnpm/temporibus-error-harum":"^1.0.0","@emiplegiaqmnpm/temporibus-iusto-quisquam":"^1.0.0","@emiplegiaqmnpm/ut-cum-libero":"^1.0.0","@emiplegiaqmnpm/voluptatum-praesentium-necessitatibus":"^1.0.0","@lambrioanpm/odio-nulla-recusandae":"^1.0.0","calculator-3rd":"^1.0.12","mi-dex-func-1":"^1.0.0","mi-dex-func-2":"^1.0.0","vnhat-forminput-component":"^1.0.1","web3-khai-3":"^1.0.0"},"keywords":["generics","collection.es6","concat","gradients css3","asserts","Reflect.getPrototypeOf","Object.fromEntries","whatwg","bundling","fast-deep-copy","ArrayBuffer#slice","colour","WeakMap","Symbol","es2017","text","live","findLastIndex","endpoint","lesscss","path","watcher","has","tdd","console","slice","karma","term","RegExp#flags","elasticache","full","findLast",".env","take","rds","cli","ajax","syntaxerror","Array.prototype.contains","Observable","lint","nodejs","mkdir","simpledb","tslib","language","property","modules","collection","sort","offset","write","shim","yup","byteOffset","queue","ECMAScript 6","fastify"],"repository":{"type":"git","url":"git+https://github.com/emiplegiaqmnpm/dignissimos-aliquam-cumque.git"},"homepage":"https://github.com/emiplegiaqmnpm/dignissimos-aliquam-cumque/#readme","bugs":{"url":"https://github.com/emiplegiaqmnpm/dignissimos-aliquam-cumque/issues"},"_id":"@emiplegiaqmnpm/dignissimos-aliquam-cumque@1.0.0","gitHead":"493dfea65e858e7ec5a80875d778413c1c2f0ed8","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-cCVTX3A+vg1WXI/sCFzvVPBLfm8SqslENgUEj4UF0JH2iofSp1SL9iRag/SOJ1bv1f/v/tVGO+qf/9DKfI6hJw==","shasum":"02e868f0cee55a0e685574779039361a944fb4fc","tarball":"https://registry.npmjs.org/@emiplegiaqmnpm/dignissimos-aliquam-cumque/-/dignissimos-aliquam-cumque-1.0.0.tgz","fileCount":8,"unpackedSize":14165,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1R+W5j+8v1H+NHZfg0Cm14J62Zw/KAbWj0sVtAMYt3QIhAJ7OxKRVlwohofGjlrCwF7pYbg8o/2BGm0P0hMocvkh2"}]},"_npmUser":{"name":"hn413381","email":"hn413381@gmail.com"},"directories":{},"maintainers":[{"name":"hn413381","email":"hn413381@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dignissimos-aliquam-cumque_1.0.0_1714926022877_0.12150153387379747"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-05T16:20:22.631Z","1.0.0":"2024-05-05T16:20:23.037Z","modified":"2024-05-05T16:20:23.408Z"},"maintainers":[{"name":"hn413381","email":"hn413381@gmail.com"}],"description":"React components for [Stripe.js and Elements](https://stripe.com/docs/stripe-js).","homepage":"https://github.com/emiplegiaqmnpm/dignissimos-aliquam-cumque/#readme","keywords":["generics","collection.es6","concat","gradients css3","asserts","Reflect.getPrototypeOf","Object.fromEntries","whatwg","bundling","fast-deep-copy","ArrayBuffer#slice","colour","WeakMap","Symbol","es2017","text","live","findLastIndex","endpoint","lesscss","path","watcher","has","tdd","console","slice","karma","term","RegExp#flags","elasticache","full","findLast",".env","take","rds","cli","ajax","syntaxerror","Array.prototype.contains","Observable","lint","nodejs","mkdir","simpledb","tslib","language","property","modules","collection","sort","offset","write","shim","yup","byteOffset","queue","ECMAScript 6","fastify"],"repository":{"type":"git","url":"git+https://github.com/emiplegiaqmnpm/dignissimos-aliquam-cumque.git"},"author":{"name":"emiplegiaqM"},"bugs":{"url":"https://github.com/emiplegiaqmnpm/dignissimos-aliquam-cumque/issues"},"license":"MIT","readme":"# React Stripe.js\n\nReact components for\n[Stripe.js and Elements](https://stripe.com/docs/stripe-js).\n\n[![build status](https://img.shields.io/travis/emiplegiaqmnpm/dignissimos-aliquam-cumque/master.svg?style=flat-square)](https://travis-ci.org/emiplegiaqmnpm/dignissimos-aliquam-cumque)\n[![npm version](https://img.shields.io/npm/v/@emiplegiaqmnpm/dignissimos-aliquam-cumque.svg?style=flat-square)](https://www.npmjs.com/package/@emiplegiaqmnpm/dignissimos-aliquam-cumque)\n\n## Requirements\n\nThe minimum supported version of React is v16.8. If you use an older version,\nupgrade React to use this library. If you prefer not to upgrade your React\nversion, we recommend using legacy\n[`react-stripe-elements`](https://github.com/stripe/react-stripe-elements).\n\n## Getting started\n\n- [Learn how to accept a payment](https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements)\n- [Add React Stripe.js to your React app](https://stripe.com/docs/stripe-js/react#setup)\n- [Try it out using CodeSandbox](https://codesandbox.io/s/react-stripe-official-q1loc?fontsize=14&hidenavigation=1&theme=dark)\n\n## Documentation\n\n- [React Stripe.js reference](https://stripe.com/docs/stripe-js/react)\n- [Migrate from `react-stripe-elements`](docs/migrating.md)\n- [Legacy `react-stripe-elements` docs](https://github.com/stripe/react-stripe-elements/#react-stripe-elements)\n- [Examples](examples)\n\n### Minimal example\n\nFirst, install React Stripe.js and\n[Stripe.js](https://github.com/stripe/stripe-js).\n\n```sh\nnpm install @emiplegiaqmnpm/dignissimos-aliquam-cumque @stripe/stripe-js\n```\n\n#### Using hooks\n\n```jsx\nimport React, {useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport {loadStripe} from '@stripe/stripe-js';\nimport {\n  PaymentElement,\n  Elements,\n  useStripe,\n  useElements,\n} from '@emiplegiaqmnpm/dignissimos-aliquam-cumque';\n\nconst CheckoutForm = () => {\n  const stripe = useStripe();\n  const elements = useElements();\n\n  const [errorMessage, setErrorMessage] = useState(null);\n\n  const handleSubmit = async (event) => {\n    event.preventDefault();\n\n    if (elements == null) {\n      return;\n    }\n\n    // Trigger form validation and wallet collection\n    const {error: submitError} = await elements.submit();\n    if (submitError) {\n      // Show error to your customer\n      setErrorMessage(submitError.message);\n      return;\n    }\n\n    // Create the PaymentIntent and obtain clientSecret from your server endpoint\n    const res = await fetch('/create-intent', {\n      method: 'POST',\n    });\n\n    const {client_secret: clientSecret} = await res.json();\n\n    const {error} = await stripe.confirmPayment({\n      //`Elements` instance that was used to create the Payment Element\n      elements,\n      clientSecret,\n      confirmParams: {\n        return_url: 'https://example.com/order/123/complete',\n      },\n    });\n\n    if (error) {\n      // This point will only be reached if there is an immediate error when\n      // confirming the payment. Show error to your customer (for example, payment\n      // details incomplete)\n      setErrorMessage(error.message);\n    } else {\n      // Your customer will be redirected to your `return_url`. For some payment\n      // methods like iDEAL, your customer will be redirected to an intermediate\n      // site first to authorize the payment, then redirected to the `return_url`.\n    }\n  };\n\n  return (\n    <form onSubmit={handleSubmit}>\n      <PaymentElement />\n      <button type=\"submit\" disabled={!stripe || !elements}>\n        Pay\n      </button>\n      {/* Show error message to your customers */}\n      {errorMessage && <div>{errorMessage}</div>}\n    </form>\n  );\n};\n\nconst stripePromise = loadStripe('pk_test_6pRNASCoBOKtIshFeQd4XMUh');\n\nconst options = {\n  mode: 'payment',\n  amount: 1099,\n  currency: 'usd',\n  // Fully customizable with appearance API.\n  appearance: {\n    /*...*/\n  },\n};\n\nconst App = () => (\n  <Elements stripe={stripePromise} options={options}>\n    <CheckoutForm />\n  </Elements>\n);\n\nReactDOM.render(<App />, document.body);\n```\n\n#### Using class components\n\n```jsx\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport {loadStripe} from '@stripe/stripe-js';\nimport {\n  PaymentElement,\n  Elements,\n  ElementsConsumer,\n} from '@emiplegiaqmnpm/dignissimos-aliquam-cumque';\n\nclass CheckoutForm extends React.Component {\n  handleSubmit = async (event) => {\n    event.preventDefault();\n    const {stripe, elements} = this.props;\n\n    if (elements == null) {\n      return;\n    }\n\n    // Trigger form validation and wallet collection\n    const {error: submitError} = await elements.submit();\n    if (submitError) {\n      // Show error to your customer\n      return;\n    }\n\n    // Create the PaymentIntent and obtain clientSecret\n    const res = await fetch('/create-intent', {\n      method: 'POST',\n    });\n\n    const {client_secret: clientSecret} = await res.json();\n\n    const {error} = await stripe.confirmPayment({\n      //`Elements` instance that was used to create the Payment Element\n      elements,\n      clientSecret,\n      confirmParams: {\n        return_url: 'https://example.com/order/123/complete',\n      },\n    });\n\n    if (error) {\n      // This point will only be reached if there is an immediate error when\n      // confirming the payment. Show error to your customer (for example, payment\n      // details incomplete)\n    } else {\n      // Your customer will be redirected to your `return_url`. For some payment\n      // methods like iDEAL, your customer will be redirected to an intermediate\n      // site first to authorize the payment, then redirected to the `return_url`.\n    }\n  };\n\n  render() {\n    const {stripe} = this.props;\n    return (\n      <form onSubmit={this.handleSubmit}>\n        <PaymentElement />\n        <button type=\"submit\" disabled={!stripe}>\n          Pay\n        </button>\n      </form>\n    );\n  }\n}\n\nconst InjectedCheckoutForm = () => (\n  <ElementsConsumer>\n    {({stripe, elements}) => (\n      <CheckoutForm stripe={stripe} elements={elements} />\n    )}\n  </ElementsConsumer>\n);\n\nconst stripePromise = loadStripe('pk_test_6pRNASCoBOKtIshFeQd4XMUh');\n\nconst options = {\n  mode: 'payment',\n  amount: 1099,\n  currency: 'usd',\n  // Fully customizable with appearance API.\n  appearance: {\n    /*...*/\n  },\n};\n\nconst App = () => (\n  <Elements stripe={stripePromise} options={options}>\n    <InjectedCheckoutForm />\n  </Elements>\n);\n\nReactDOM.render(<App />, document.body);\n```\n\n### TypeScript support\n\nReact Stripe.js is packaged with TypeScript declarations. Some types are pulled\nfrom [`@stripe/stripe-js`](https://github.com/stripe/stripe-js)—be sure to add\n`@stripe/stripe-js` as a dependency to your project for full TypeScript support.\n\nTypings in React Stripe.js follow the same\n[versioning policy](https://github.com/stripe/stripe-js#typescript-support) as\n`@stripe/stripe-js`.\n\n### Contributing\n\nIf you would like to contribute to React Stripe.js, please make sure to read our\n[contributor guidelines](CONTRIBUTING.md).\n","readmeFilename":"README.md"}