ass credit flutterwave
This commit is contained in:
@@ -19,11 +19,11 @@
|
||||
<!-- </ion-toolbar>-->
|
||||
<!--</ion-header>-->
|
||||
<ion-content>
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/redeem.jpg)'">
|
||||
<div class="ion-padding">
|
||||
<!-- <ion-icon slot="start" name="arrow-back" class="back" (click)="onBack()"></ion-icon>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="bg_image back_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/redeem.jpg)'">-->
|
||||
<!-- <div class="ion-padding">-->
|
||||
<!-- <!– <ion-icon slot="start" name="arrow-back" class="back" (click)="onBack()"></ion-icon>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="ion-padding">
|
||||
<div class="boxed_contents">
|
||||
@@ -89,19 +89,73 @@
|
||||
<ion-input label="Total" type="number" placeholder="0" [(ngModel)]='total_display' [readonly]="true"></ion-input>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<!-- <div class="row">-->
|
||||
<!-- <ion-label class="bg_text">3D Design</ion-label>-->
|
||||
<!-- <div class="rate">-->
|
||||
<!-- <ion-icon name="star-half-outline" color="warning"></ion-icon>-->
|
||||
<!-- <ion-label class="review">4.8 (4478 reviews)</ion-label>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<ion-row>
|
||||
<ion-col>Payment</ion-col>
|
||||
<ion-col>Payment
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="secondary">
|
||||
<ion-button fill="outline" size="small" shape="round" (click)="setCcType(200)">
|
||||
<ion-icon slot="start" name="card" ></ion-icon>
|
||||
Cards
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
|
||||
<ion-buttons slot="secondary">
|
||||
<ion-button fill="outline" size="small" shape="round" (click)="setCcType(400)">
|
||||
<ion-icon slot="start" name="add-circle" ></ion-icon>
|
||||
New Card
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
|
||||
<!-- <div class="row">-->
|
||||
<!-- <ion-radio-group value="custom-checked" style="margin-left: 20px; font-size: 12px; color: #1e2023;">-->
|
||||
<!-- Previous : <ion-radio value="custom-checked" aria-label="Custom checkbox"></ion-radio>-->
|
||||
<!-- New Card: <ion-radio value="custom" aria-label="Custom checkbox that is checked"></ion-radio>-->
|
||||
<!-- </ion-radio-group>-->
|
||||
|
||||
<!--<!– <ion-label class="bg_text">3D Design</ion-label>–>-->
|
||||
<!--<!– <div class="rate">–>-->
|
||||
<!--<!– –>-->
|
||||
|
||||
<!--<!– <ion-icon name="star-half-outline" color="warning"></ion-icon>–>-->
|
||||
<!--<!– <ion-label class="review">4.8 (4478 reviews)</ion-label>–>-->
|
||||
<!--<!– </div>–>-->
|
||||
<!-- </div>-->
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-row *ngIf="card_level==200">
|
||||
<ion-col>
|
||||
<ion-select (ionChange)="refreshFee()" placeholder="Select Payment Card" [(ngModel)]='payment_card' size="block">
|
||||
<ion-select-option value="{{item.card_uid}}" *ngFor="let item of usersCardsData">{{item.description}} **** **** **** {{item.digits}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-row *ngIf="card_level==400">
|
||||
<ion-col>
|
||||
{{recipient_name}}
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input type="text" placeholder="Card Holder"></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input type="number" placeholder="Card Number"></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input type="number" placeholder="Expiry Date"></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input type="number" placeholder="CVV"></ion-input>
|
||||
</ion-item>
|
||||
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ ion-content {
|
||||
}
|
||||
.back_image {
|
||||
width: 100%;
|
||||
height: 110px;
|
||||
height: 80px;
|
||||
|
||||
.back {
|
||||
font-size: 25px;
|
||||
|
||||
@@ -6,6 +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"
|
||||
|
||||
@Component({
|
||||
selector: 'app-addcredit',
|
||||
@@ -26,6 +27,29 @@ export class AddcreditPage implements OnInit {
|
||||
isModalOpen:boolean = false;
|
||||
isModalOpenBackdrop:boolean = false;
|
||||
|
||||
|
||||
|
||||
publicKey = "FLWPUBK_TEST-XXXXXXXXX";
|
||||
|
||||
customerDetails = { name: 'Demo Customer Name', email: 'customer@mail.com', phone_number: '08100000000'}
|
||||
|
||||
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(),
|
||||
amount: 10,
|
||||
currency: 'NGN',
|
||||
payment_options: 'card,ussd',
|
||||
meta: this.meta,
|
||||
customer: this.customerDetails,
|
||||
customizations: this.customizations,
|
||||
}
|
||||
|
||||
|
||||
|
||||
constructor(private navctr: NavController,
|
||||
private router: Router,
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
@@ -33,6 +57,7 @@ export class AddcreditPage implements OnInit {
|
||||
public blogDataService: BlogDataService,
|
||||
private loadingCtrl: LoadingController,
|
||||
public alertController: AlertController,
|
||||
/* private flutterwave: Flutterwave,*/
|
||||
public userWalletService: UserWalletService) {
|
||||
this.walletData = this.router.getCurrentNavigation().extras.state;
|
||||
if ( this.walletData != undefined ){
|
||||
@@ -86,6 +111,19 @@ export class AddcreditPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
payViaPromise() {
|
||||
// this.flutterwave.asyncInlinePay(this.paymentData).then(
|
||||
// (response) =>{
|
||||
// console.log("Promise Res" , response)
|
||||
// this.flutterwave.closePaymentModal(5)
|
||||
// }
|
||||
// )
|
||||
}
|
||||
generateReference(): string {
|
||||
let date = new Date();
|
||||
return date.getTime().toString();
|
||||
}
|
||||
|
||||
|
||||
startCreditData:{
|
||||
member_id:number,
|
||||
@@ -195,6 +233,10 @@ export class AddcreditPage implements OnInit {
|
||||
duration: 3500,
|
||||
});
|
||||
|
||||
if(this.processor == 3030){
|
||||
debugger;
|
||||
this.payViaPromise();
|
||||
}
|
||||
if (this.processor == 5000){
|
||||
this.isProcessDisabled = true;
|
||||
this.payPevCreditData={
|
||||
|
||||
@@ -9,10 +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"
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule, HttpClientModule
|
||||
imports: [BrowserModule,/*FlutterwaveModule,*/ IonicModule.forRoot(), AppRoutingModule, HttpClientModule
|
||||
],
|
||||
providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },BnNgIdleService],
|
||||
bootstrap: [AppComponent],
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<div class="bg_image back_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/p3.jpg)'">
|
||||
<div class="ion-padding">
|
||||
<!-- <ion-icon slot="start" name="arrow-back" class="back" (click)="onBack()"></ion-icon>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="bg_image back_image" [style.backgroundImage]="'url(https://www.wrenchboard.com/assets/images/apps/p3.jpg)'">-->
|
||||
<!-- <div class="ion-padding">-->
|
||||
<!--<!– <ion-icon slot="start" name="arrow-back" class="back" (click)="onBack()"></ion-icon>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="boxed_contents">
|
||||
|
||||
<div class="ion-padding">
|
||||
@@ -37,10 +37,13 @@
|
||||
|
||||
<ion-card style="margin: 0px;">
|
||||
<ion-card-content style="padding: 1px;">
|
||||
<div style="margin-bottom: 5px;">
|
||||
<ion-input style="background-color: aliceblue;" label="Input with placeholder" placeholder="Item Name"></ion-input>
|
||||
</div>
|
||||
<ion-textarea
|
||||
style="background-color: aliceblue; margin: 0px; min-height: 100px"
|
||||
style="background-color: aliceblue; margin: 0px; min-height: 80px"
|
||||
label="File description ..."
|
||||
placeholder="Enter file description"
|
||||
placeholder="Enter detail description"
|
||||
[(ngModel)]='yourmessage' ></ion-textarea>
|
||||
</ion-card-content>
|
||||
<ion-grid>
|
||||
|
||||
Reference in New Issue
Block a user