Added flutterwave-angular-v3
This commit is contained in:
@@ -6,7 +6,7 @@ import {WrenchService} from "../../services/wrench.service";
|
||||
import {BlogDataService} from "../../store/blog-data.service";
|
||||
import {UserWalletService} from "../../store/user-wallet.service";
|
||||
import {Unary} from "@angular/compiler";
|
||||
//import {Flutterwave, AsyncPaymentOptions} from "flutterwave-angular-v3"
|
||||
import {Flutterwave, AsyncPaymentOptions, PaymentSuccessResponse} from "flutterwave-angular-v3"
|
||||
|
||||
@Component({
|
||||
selector: 'app-addcredit',
|
||||
@@ -37,7 +37,7 @@ export class AddcreditPage implements OnInit {
|
||||
customizations = {title: 'Customization Title', description: 'Customization Description', logo: 'https://flutterwave.com/images/logo-colored.svg'}
|
||||
|
||||
meta = {'counsumer_id': '7898', 'consumer_mac': 'kjs9s8ss7dd'}
|
||||
/*
|
||||
|
||||
paymentData : AsyncPaymentOptions = {
|
||||
public_key: this.publicKey,
|
||||
tx_ref: this.generateReference(),
|
||||
@@ -48,7 +48,7 @@ export class AddcreditPage implements OnInit {
|
||||
customer: this.customerDetails,
|
||||
customizations: this.customizations,
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
constructor(private navctr: NavController,
|
||||
private router: Router,
|
||||
@@ -57,7 +57,7 @@ export class AddcreditPage implements OnInit {
|
||||
public blogDataService: BlogDataService,
|
||||
private loadingCtrl: LoadingController,
|
||||
public alertController: AlertController,
|
||||
/* private flutterwave: Flutterwave,*/
|
||||
private flutterwave: Flutterwave,
|
||||
public userWalletService: UserWalletService) {
|
||||
this.walletData = this.router.getCurrentNavigation().extras.state;
|
||||
if ( this.walletData != undefined ){
|
||||
@@ -115,12 +115,13 @@ export class AddcreditPage implements OnInit {
|
||||
}
|
||||
|
||||
payViaPromise() {
|
||||
// this.flutterwave.asyncInlinePay(this.paymentData).then(
|
||||
// (response) =>{
|
||||
// console.log("Promise Res" , response)
|
||||
// this.flutterwave.closePaymentModal(5)
|
||||
// }
|
||||
// )
|
||||
this.flutterwave.asyncInlinePay(this.paymentData).then(
|
||||
(response) =>{
|
||||
console.log("Promise Res" , response)
|
||||
this.flutterwave.closePaymentModal(5)
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
generateReference(): string {
|
||||
let date = new Date();
|
||||
|
||||
@@ -9,11 +9,11 @@ import { AppComponent } from './app.component';
|
||||
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { BnNgIdleService } from 'bn-ng-idle'; // import bn-ng-idle service
|
||||
//import { FlutterwaveModule} from "flutterwave-angular-v3"
|
||||
import { FlutterwaveModule} from "flutterwave-angular-v3"
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
imports: [BrowserModule,/*FlutterwaveModule,*/ IonicModule.forRoot(), AppRoutingModule, HttpClientModule
|
||||
imports: [BrowserModule, FlutterwaveModule, IonicModule.forRoot(), AppRoutingModule, HttpClientModule
|
||||
],
|
||||
providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },BnNgIdleService],
|
||||
bootstrap: [AppComponent],
|
||||
|
||||
Reference in New Issue
Block a user