
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@websanova/vue-pay
Advanced tools
A simple, light weight payment wrapper module third party payment libraries.
A simple, light weight payment wrapper module third party payment libraries.
I've played with some other libraries out there, but felt I still needed to do too much wiring so wanted to make a simple little wrapper for my projects that just "worked" as simply as possible.
For anyone taking a look, I haven't had time to setup a demo and more docs yet. It's probably best to just take a look at the source code or consider contrubuting before posting any issues.
Please note that this is a work in progress release. The main idea is to use external/embedded elements to generate a user token which can then be used on the API for further processing with the merchant.
card
, cardNunber
, cardExpiry
, and cardCvc
elements.$ sudo npm install @websanova/vue-pay
Using the plugin comes in three (easy) steps.
Once the plugin is included, using the elements should pretty much be automagical for everything else.
Note the matching stripe
gateway keys. These can be named whatever you like but will be the reference for later requests.
// Pay
import pay from '@websanova/vue-pay/src/v2.js';
import stripe from '@websanova/vue-pay/src/drivers/stripe.v3.js';
Vue.use(pay, {
gateways: {
stripe: stripe
},
options: {
stripe: {
key: process.env.VUE_APP_STRIPE_KEY
}
}
});
The elements will auto load the sdk (url) for us as specifid in the driver. This means that
NOTE: Note the loaded
event which lets us put up a spinner / overlay while sdk/inputs are loading.
<template>
<div
class="form-control"
>
<el-input-stripe
type="card"
:options="options"
@loaded="$emit('loaded', $event)"
/>
</div>
</template>
<script>
import ElInputStripe from '@websanova/vue-pay/src/elements/InputStripe.vue';
export default {
props: {
type: String,
placeholder: String,
},
computed: {
options() {
return {
style: {
base: {
fontSize: '16px',
lineHeight: '24px',
color: '#495057',
},
invalid: {}
},
placeholder: this.placeholder
};
}
},
components: {
ElInputStripe
}
}
</script>
<template>
<div>
<button
@click="submit"
/>
</div>
</template>
<script>
export default {
methods: {
submit() {
Vue.pay.createUser({
// Only accepts "card" for now via
// "card" or "cardNumber" elements.
type:'card',
// keyword here from install letting
// us know which merchant to use.
gateway: 'stripe'
})
.then((res) => {
// The "res" is the respone from the merchant.
// make api request
});
}
}
}
</script>
We can also call reset on our form to clear any existing input or errors.
this.$pay.reset({gateway: 'stripe'});
FAQs
A simple, light weight payment wrapper module third party payment libraries.
We found that @websanova/vue-pay demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.