qenta-datastorage-multibtn
npm install qenta-datastorage-multibtnThe Qenta Datastorage Multibtn is use for render the Googlepay or Applepay button by using qenta payment checkout method.
Render the Googlepay or Applepay button Compatible for :
- React js
- Vue js
- Angular js
!Chrome | !Firefox | !Safari | !Opera | !Edge | !IE |
--- | --- | --- | --- | --- | --- |
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
Using npm:
``bash`
$ npm i qenta-datastorage-multibtn
Using yarn:
`bash`
$ yarn add qenta-datastorage-multibtn
Once the package is installed, you can import the library using import approach:
`js`
import DsMultiBtn from 'qenta-datastorage-multibtn';
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
`js
import DsMultiBtn from 'qenta-datastorage-multibtn';
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
`js
import DsMultiBtn from 'qenta-datastorage-multibtn';
: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'"
/>
`
Example in Angular js
Inside your .Ts File Add below code`js
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);
}
}
`.Html File
Inside your Add below code
`Html`
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.,
`Html``
* qenta
This package supported in
- Reactjs
- vuejs
- AngularJS
This project is licensed under the License Name - see the LICENSE file for details.