0.1.1 • Published 4 years ago

vue-onepipejs-checkout v0.1.1

Weekly downloads
7
License
MIT
Repository
github
Last release
4 years ago

vue-onepipejs-checkout

npm Github file size npm GitHub license Vue2 jsDelivr Tested with TestCafe

OnePipe.io is a OneGateway many service. This package implements the the version 2 of collect , airtime purchase , data purchase service. Check OnePipe documentation for more information

:heavy_check_mark: Browser Support

ChromeFirefoxSafariOperaEdgeIEiOS SafariAndroid WebViewAndroid WebView
74+ :heavy_check_mark:66+ :heavy_check_mark:12+ :heavy_check_mark:46+ :heavy_check_mark:17+ :heavy_check_mark:11+ :heavy_check_mark:12+ :heavy_check_mark:67+ :heavy_check_mark:8.2+ :heavy_check_mark:

We support only browsers with global usage statistics greater then 1%, last 2 version of each browser but not dead browsers. Library may work in older browser but we don't not guarantee that. You may need addition polyfills to make it work.

Installation

This version requires Vue 2.X.

npm i vue-onepipejs-checkout

Initialization

import Vue from 'vue'

// As a plugin
import Checkout from 'onepipe-checkout'
Vue.use(Checkout);

// Or as a directive
import { Checkout } from 'vue-onepipejs-checkout'
Vue.directive('onepipe-checkout', Checkout);

Usage

<onepipe-checkout
	size="md"
	:rounded="true"
	api_key="api-key"
	:amount="500"
	request_type="collect"
	:transaction_ref="'123232'"
	:transaction_ref_parent="'parent_123232'"
	transaction_desc="demos payment"
	:customer="customer"
	:options="options"
	:meta="meta"
	:details="details"
	:callback="onCallback"
	:close="onClose">
	Checkout
</onepipe-checkout>

:gear: Configs

List of supported placeholders:

ValueFormat
amountIn kobo Eg. 50000
api_keyOnePipe API key
request_typecollect, airtime purchase, data purchase
close()function()
callback()function()
transaction_descEg. Sample payment
transaction_refUnique Eg. TRX-732423
transaction_ref_parentTRX-732423
customerObject
detailsObject
optionsObject
metaObject
sizemd, sm, lg
roundedtrue, false

Customize configuration

For more details about the configs see OnePipe Documentation.