flutterwave-angularjs
Version:
An AngularJS library for RavePay Payment Gateway.
197 lines (191 loc) • 6.28 kB
JavaScript
import { EventEmitter, Component, Input, Output, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
/**
* @fileoverview added by tsickle
* Generated from: lib/flutterwave-angularjs.component.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @record
*/
function IRaveOptions() { }
if (false) {
/** @type {?} */
IRaveOptions.prototype.PBFPubKey;
/** @type {?} */
IRaveOptions.prototype.txref;
/** @type {?} */
IRaveOptions.prototype.amount;
/** @type {?} */
IRaveOptions.prototype.currency;
/** @type {?} */
IRaveOptions.prototype.country;
/** @type {?} */
IRaveOptions.prototype.customer_email;
/** @type {?} */
IRaveOptions.prototype.customer_firstname;
/** @type {?} */
IRaveOptions.prototype.customer_lastname;
/** @type {?} */
IRaveOptions.prototype.custom_title;
/** @type {?} */
IRaveOptions.prototype.custom_description;
/** @type {?} */
IRaveOptions.prototype.custom_logo;
/** @type {?|undefined} */
IRaveOptions.prototype.meta;
/** @type {?} */
IRaveOptions.prototype.callback;
/** @type {?} */
IRaveOptions.prototype.onclose;
}
/**
* @record
*/
function MyWindow() { }
if (false) {
/** @type {?} */
MyWindow.prototype.getpaidSetup;
}
class FlutterwaveAngularjsComponent {
constructor() {
this.callback = new EventEmitter();
this.close = new EventEmitter();
}
/**
* @return {?}
*/
ngOnInit() { }
/**
* @return {?}
*/
madePayment() {
this.prepRaveOptions();
window.getpaidSetup(this.raveOptions);
}
/**
* @return {?}
*/
prepRaveOptions() {
this.raveOptions = {
PBFPubKey: this.key,
txref: this.reference,
amount: this.amount,
customer_email: this.email,
onclose: (/**
* @return {?}
*/
() => this.close.emit()),
callback: (/**
* @param {?} response
* @return {?}
*/
(response) => this.callback.emit(response)),
currency: this.currency || 'NGN',
country: this.country || 'NG',
customer_firstname: this.customer_firstname || '',
customer_lastname: this.customer_lastname || '',
custom_title: this.custom_title || '',
custom_description: this.custom_description || '',
custom_logo: this.custom_logo || '',
meta: this.meta || {}
};
}
}
FlutterwaveAngularjsComponent.decorators = [
{ type: Component, args: [{
selector: 'rave-pay-button',
template: "<button\n class=\"paystack-pay-button\"\n [ngStyle]=\"style\"\n [ngClass]=\"className\"\n (click)=\"madePayment()\">\n {{text || 'Pay'}}\n</button>",
styles: ["h1{color:red}"]
}] }
];
/** @nocollapse */
FlutterwaveAngularjsComponent.ctorParameters = () => [];
FlutterwaveAngularjsComponent.propDecorators = {
text: [{ type: Input }],
style: [{ type: Input }],
className: [{ type: Input }],
callback: [{ type: Output }],
close: [{ type: Output }],
key: [{ type: Input }],
email: [{ type: Input }],
amount: [{ type: Input }],
reference: [{ type: Input }],
meta: [{ type: Input }],
currency: [{ type: Input }],
country: [{ type: Input }],
customer_firstname: [{ type: Input }],
customer_lastname: [{ type: Input }],
custom_title: [{ type: Input }],
custom_description: [{ type: Input }],
custom_logo: [{ type: Input }]
};
if (false) {
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.text;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.style;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.className;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.callback;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.close;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.key;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.email;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.amount;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.reference;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.meta;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.currency;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.country;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.customer_firstname;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.customer_lastname;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.custom_title;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.custom_description;
/** @type {?} */
FlutterwaveAngularjsComponent.prototype.custom_logo;
/**
* @type {?}
* @private
*/
FlutterwaveAngularjsComponent.prototype.raveOptions;
}
/**
* @fileoverview added by tsickle
* Generated from: lib/flutterwave-angularjs.module.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
class FlutterwaveAngularjsModule {
}
FlutterwaveAngularjsModule.decorators = [
{ type: NgModule, args: [{
declarations: [FlutterwaveAngularjsComponent],
imports: [
CommonModule
],
exports: [FlutterwaveAngularjsComponent]
},] }
];
/**
* @fileoverview added by tsickle
* Generated from: public-api.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* Generated from: flutterwave-angularjs.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
export { FlutterwaveAngularjsModule, FlutterwaveAngularjsComponent as ɵa };
//# sourceMappingURL=flutterwave-angularjs.js.map