1.0.0 • Published 2 years ago
ourpass-checkout-angular-button-v1 v1.0.0
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
src | Product Image |
---|---|
amount | Product Amount |
url | Shoppers Website Address |
name | Product Name |
Email of Pass User | |
qty | Quantity of products been bought |
description | Product description |
key | Your Seller Pass Secret Key |
onClose | Javascript function that should be called if the customer closes the payment window |
onSuccess | Javascript function that should be called if the payment is successful |