@payze/payze-apple-pay
v0.1.7
Published
payze.io payment gateway
Downloads
47
Readme
About The Project
Payze is the best software platform for running an internet business. We handle money movement flow for our customers by giving them tools they need.
Getting Started
Installation
- Install payze package in your project
npm install @payze/payze-apple-pay
Basic Usage
- Import payze-apple-pay SDK
import { PayzeApplePay } from "@payze/payze-apple-pay";
- Initialize payze
const applePay = PayzeApplePay(merchantIdentifier, { amount, currencyCode, label }, callback);
- Include following html
<div class="apple-pay-button apple-pay-button-black" id="apple-pay-button" (click)="clickEvent()"> </div>
- Initialize Payment (In order to get transactionId you need to make request from API ('Just Pay' or 'Single Payment and Split')
clickEvent() { this.applePay.makeApplePay('transactionId'); }
Customization
// Payze Apple Pay SDK accepts 2 arguments: merchant Identifier and configuration
// both are required
// Example usage:
const payze = PayzeApplePay('merchant.io.payze', {
amount: 10, // required
currencyCode: 'GEL', // default (not required)
label: 'Payze' // default (not required)
}, applePayResultStatus);
applePayResultStatus(result) {
console.log(result);
//status: 0 success
//status: 1 failed
}
License
Distributed under the MIT License. See LICENSE.txt
for more information.