@payze/payze-apple-pay
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

MIT License


Logo

Payze Apple Pay JS SDK

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

  1. Install payze package in your project
    npm install @payze/payze-apple-pay

Basic Usage

  1. Import payze-apple-pay SDK
    import { PayzeApplePay } from "@payze/payze-apple-pay";
  2. Initialize payze
    const applePay = PayzeApplePay(merchantIdentifier, { amount, currencyCode, label }, callback);
  3. Include following html
     <div class="apple-pay-button apple-pay-button-black" 
           id="apple-pay-button" 
           (click)="clickEvent()">
    
     </div>
  4. 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.

Readme

Keywords

none

Package Sidebar

Install

npm i @payze/payze-apple-pay

Weekly Downloads

22

Version

0.1.7

License

MIT

Unpacked Size

30.1 kB

Total Files

7

Last publish

Collaborators

  • payze