Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@vue-storefront/checkout-com
Advanced tools
1. Open your `nuxt.config.js` 2. At the bottom of `modules` add: ```js ['@vue-storefront/checkout-com/nuxt', { publicKey: 'pk_test_your-public-key' }], ```
nuxt.config.js
modules
add:['@vue-storefront/checkout-com/nuxt', { publicKey: 'pk_test_your-public-key' }],
useCkoCard
:import { useCkoCard } from '@vue-storefront/checkout-com';
useCkoCard
returns:interface {
error: Error | null,
submitDisabled: Boolean,
submitForm: async(),
makePayment: async({ cartId }),
initForm: (): void
}
In this step you need:
const { submitForm, submitDisabled, initForm } = useCkoCard();
initForm
in setup
. It will set submitDisabled
to true and create Card Component in onMounted
hook.submitDisabled
changes to false - it means provided Card's data is proper and you could allow your user go forward. Card's token will be stored in localStorage for a moment.const { makePayment, error: paymentError } = useCkoCard();
const { cart } = useCart();
const {
placeOrder
} = useCheckout();
error
- contains error message from the response if you do not use 3ds or we have some server related issues. If the user just removed stored token from localStorage it will have There is no payment token
inside.
makePayment
- it proceeds with the payment and removes card token afterward. Returns Promise if succeed, or Promise if failed.
makePayment
at first (remember to check if everything went ok):const payment = await makePayment({ cartId: cart.value.id });
if (!payment) return;
const order = await placeOrder();
payment.data.redirect_url
contains 3DS Auth redirect url if it is required by bank. You have to support it:if (payment.data.redirect_url) {
window.location.href = payment.data.redirect_url;
return;
}
makePayment
method:success_url: `${window.location.origin}/cko/payment-success`,
failure_url: `${window.location.origin}/cko/payment-error`
FAQs
### Stay connected
The npm package @vue-storefront/checkout-com receives a total of 2 weekly downloads. As such, @vue-storefront/checkout-com popularity was classified as not popular.
We found that @vue-storefront/checkout-com demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.