qenta-datastorage-multibtn
v1.0.73
Published
qenta-datastorage-multibtn
Readme
Table of Contents
- Features
- Browser Support
- Installing
- Example
- Return Result
- Resources
- Supported language
- License
- Acknowledgments
Features
Render the Googlepay or Applepay button Compatible for :
- React js
- Vue js
- Angular js
Browser Support
|
|
|
|
|
|
--- | --- | --- | --- | --- | --- |
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
Installing
Using npm:
$ npm i qenta-datastorage-multibtnUsing yarn:
$ yarn add qenta-datastorage-multibtnOnce the package is installed, you can import the library using import approach:
import DsMultiBtn from 'qenta-datastorage-multibtn';Example
Include a section with usage examples to help users understand how to apply your package in different scenarios.
This are the Property you need to pass.
| Property | Definition | Example | | -------- | ---------- | ------ | | secret * | It's your qenta's secret key. | - | | customerId * | It's your qenta's customerId. | - | | shopId *| It's your qenta's shopId. | - | | language *| if you want to change your local language by default we use english. | en / de / it / fr / es | | amount *| It's your payment amount. | 1, 10 or any number | | currency *| It's your local currency. | INR,USD,EUR | | countrycode *| It's your local countrycode. | INR,USD,EUR | | descriptions *| used for applepay payment sheet . | empty or any descriptions need to put | | btntype *| for choose which button to render (applepay or googlepay button. use 'all' instead for show both) | all / googlepay / applepay | returnurl *| It's your url init payment file to qenta. | http://localhost/frontend/init.php |
Example in React js
import DsMultiBtn from 'qenta-datastorage-multibtn';
<DsMultiBtn
secret={'your_secret'}
customerid={'your_customerid'}
shopid={'your_shopid'}
language={'language'}
amount={'your_checkout_amount'}
currency={'your_currency'} //eg. EUR / USD
countrycode={'your_countrycode'} //eg. AT / US
descriptions={'test payment'}
btntype={'all'} //all - applepay - googlepay
returnurl={'http://localhost/frontend/init.php'}
/>
Example in Vue js
import DsMultiBtn from 'qenta-datastorage-multibtn';
<template>
<DsMultiBtn
:secret="'your_secret'"
:customerid="'your_customerid'"
:shopid="'your_shopid'"
:language="'language'"
:amount="'your_checkout_amount'"
:currency="'your_currency'"
:countrycode="'your_countrycode'"
:descriptions="'test payment'"
:btntype="'all'"
:returnurl="'http://localhost/frontend/init.php'"
/>
</template>Example in Angular js
Inside your .Ts File Add below code
import DsMultiBtn from 'qenta-datastorage-multibtn';
export class AppComponent {
props :any = {
secret:'your_secret',
customerid:'your_customerid',
shopid:'your_shopid',
language:'language',
amount:'your_checkout_amount',
currency='currency',
countrycode='your_countrycode',
descriptions='test payment',
btntype='all',
returnurl='http://localhost/frontend/init.php'
};
ocrMultiBtnHtml: string;
constructor() {
this.ocrMultiBtnHtml = DsMultiBtn(this.props);
}
}Inside your .Html File Add below code
<div [innerHTML]="ocrMultiBtnHtml"></div>Return Result
besides iframe with applepay or googleplay button, DsMultiBtn will also return storageId parameters
get storageId from hidden input value by using id="storageId".
e.g.,
<input type="hidden" id="storageId" storageid="f34a9f4c612b6b0bf31a717e11xxxxxx">Resources
Supported language
This package supported in
License
This project is licensed under the License Name - see the LICENSE file for details.
acknowledgments
If your package relies on other open-source projects or you want to give credit to contributors, include an acknowledgments section.
