1.0.0 • Published 2 years ago

ourpass-checkout-angular-button-v1 v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Pass Inline For Angular.js

Getting Started

‌This library would help you add the Pass checkout button to your angular projects in no time.‌

Installation

npm i pass-angular-button-v1

Import the Module

After installing the component, register the module in your root app.module.ts file

Import the Module
import { NgModule } from '@angular/core';​
import { PassbuttonModule } from 'pass-angular-button-v1';
...
​
​
@NgModule({​  
​
imports: [..., PassbuttonModule],
​
})

​
export class AppModule {}​

Implement in your project

<lib-passbutton [clientInfo]="payload"></lib-passbutton>

And then add the clientInfo data in your component.ts file:

import { Component } from '@angular/core';
​
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
​
export class AppComponent {
title = 'passangularbutton';
payload = {
    link: 'https://staging-pass.ourpass.co/view',
    src: 'https://raw.githubusercontent.com/Cheetah-Speed-Technology/website_dstore/master/Cap-front1.png',
    amount: '10',
    url: 'jumia.com.ng',
    name: 'Cap',
    email: 'wisdomekpot@gmail.com',
    qty: '1',
    description: 'Great Pass Cap',
    key: 'pass_sec_test_ewxaVQBbr5JTt6P2tpIUUAZGdpqzRckV',
    onClose: function () {
    alert('It Closed oo');
    },
    onSuccess: function () {
    alert('It Succeeded oo');
    },
};
}

Options

Note that all fields here are required

srcProduct Image
amountProduct Amount
urlShoppers Website Address
nameProduct Name
emailEmail of Pass User
qtyQuantity of products been bought
descriptionProduct description
keyYour Seller Pass Secret Key
onCloseJavascript function that should be called if the customer closes the payment window
onSuccessJavascript function that should be called if the payment is successful

1.0.0

2 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago