qenta-datastorage-googlepay
v1.0.9
Published
qenta-datastorage-googlepay
Downloads
25
Readme
Table of Contents
- Features
- Browser Support
- Installing
- Example
- Return Result
- Resources
- Supported language
- License
- Acknowledgments
Features
Render the Googlepay button Compatible for :
- React js
- Vue js
- Angular js
Browser Support
|
|
|
|
|
|
--- | --- | --- | --- | --- | --- |
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
Installing
Using npm:
$ npm i qenta-datastorage-googlepayUsing yarn:
$ yarn add qenta-datastorage-googlepayOnce the package is installed, you can import the library using import approach:
import DsGooglepay from 'qenta-datastorage-googlepay';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 | | returnurl *| It's your url init payment file to qenta. | http://localhost/frontend/init.php |
Example in React js
import DsGooglepay from 'qenta-datastorage-googlepay';
<DsGooglepay
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
returnurl={'http://localhost/frontend/init.php'}
/>
Example in Vue js
import DsGooglepay from 'qenta-datastorage-googlepay';
export default {
name: 'App',
components: {
DsGooglepay
}
}
<template>
<DsGooglepay
:secret="'your_secret'"
:customerid="'your_customerid'"
:shopid="'your_shopid'"
:language="'language'"
:amount="'your_checkout_amount'"
:currency="'your_currency'"
:countrycode="'your_countrycode'"
:returnurl="'http://localhost/frontend/init.php'"
/>
</template>Example in Angular js
Inside your .Ts File Add below code
import DsGooglepay from 'qenta-datastorage-googlepay';
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',
returnurl='http://localhost/frontend/init.php'
};
ocrGpayHtml: string;
constructor() {
this.ocrGpayHtml = DsGooglepay(this.props);
}
}Inside your .Html File Add below code
<div [innerHTML]="ocrGpayHtml"></div>Return Result
beside iframe with googleplay button, DsGooglepay 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.
