
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@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 0 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.