diff --git a/src/app/accounts/addcredit/addcredit.page.html b/src/app/accounts/addcredit/addcredit.page.html
index aed14e8..38c3b9e 100644
--- a/src/app/accounts/addcredit/addcredit.page.html
+++ b/src/app/accounts/addcredit/addcredit.page.html
@@ -117,6 +117,7 @@
+
@@ -157,183 +158,66 @@
-
-
-
- Confirm Wallet Withdraw
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Amount({{currency_code}})
-
-
-
-
-
- Fee
-
-
-
-
-
- Total
-
-
-
-
-
- Recipient
-
-
-
-
-
-
-
-
-
-
-
-
- {{recipient_name}}
-
-
-
-
-
- Confirm
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Withdraw Result
-
-
-
-
-
-
- Amount({{currency_code}})
-
-
-
-
-
- Fee
-
-
-
-
-
- Total
-
-
-
-
-
- Recipient
-
-
-
-
- {{recipient_name}}
-
-
-
-
- Confirmation
-
- {{confirmation}}
-
-
-
-
-
- Estimated delivery time is 2 to 4 Hours.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Confirm Payment
+
+ Close
+
+
+
+
+
+
+
+ Credit {{currency_code}} Wallet
+
+
+ Amount:
+ {{startCreditResult.amount*0.01| number : '1.2-2' }}
+
+
+ Fee:
+ {{startCreditResult.fee*.01 | number : '1.2-2'}}
+
+
+ Total:
+ {{startCreditResult.total*.01| number : '1.2-2' }}
+
+
+
+
+
+
+
+ Ref Number:
+
+
+ {{startCreditResult.credit_reference}}
+
+
+
+
+
+
+
+ Complete
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/accounts/addcredit/addcredit.page.scss b/src/app/accounts/addcredit/addcredit.page.scss
index 227cd5a..a5e0298 100644
--- a/src/app/accounts/addcredit/addcredit.page.scss
+++ b/src/app/accounts/addcredit/addcredit.page.scss
@@ -1,4 +1,8 @@
-
+.pop_list{
+ ion-item{
+ font-size: 14px;
+ }
+}
ion-content {
ion-card{
margin: 10px 0px 10px 0px;
diff --git a/src/app/accounts/addcredit/addcredit.page.ts b/src/app/accounts/addcredit/addcredit.page.ts
index 7ac17a7..75e6824 100644
--- a/src/app/accounts/addcredit/addcredit.page.ts
+++ b/src/app/accounts/addcredit/addcredit.page.ts
@@ -5,6 +5,7 @@ import {SessionDataProviderService} from "../../store/session-data-provider.serv
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";
@Component({
selector: 'app-addcredit',
@@ -21,7 +22,8 @@ export class AddcreditPage implements OnInit {
isDisabled:boolean=true;
curr_page:string= 'redeem_start';
processor:number=0;
-
+ isModalOpen:boolean = false;
+ isModalOpenBackdrop:boolean = false;
constructor(private navctr: NavController,
private router: Router,
@@ -47,6 +49,7 @@ export class AddcreditPage implements OnInit {
this.getUsersCardsList();
}
onBack() {
+ this.setCloseModal();
this.navctr.back();
}
@@ -80,13 +83,44 @@ export class AddcreditPage implements OnInit {
}
+ startCreditData:{
+ member_id:number,
+ sessionid:string,
+ uid:string,
+ currency: string,
+ amount:number,
+ card_uid: string,
+ action:number
+};
+
+ startCreditResult:any;
contineAddCredit(processor){
+ this.startCreditData = {
+ member_id:this.sessionDataProviderService.member_id,
+ sessionid:this.sessionDataProviderService.session,
+ uid:this.sessionDataProviderService.member_uid,
+ currency: this.currency_code,
+ amount:this.amount*100,
+ card_uid: this.payment_card,
+ action:11053
+ };
-
-
+ this.wrenchService.startCredit(this.startCreditData).subscribe(
+ startCreditResult => {
+ console.log("startCreditResult TOTAL RETURN->", this.startCreditResult);
+ if ( startCreditResult!=undefined && startCreditResult.credit_reference!='' ){
+ this.startCreditResult = startCreditResult;
+ this.isModalOpen = true;
+ this.isModalOpenBackdrop= true;
+ }
+ }
+ );
+ }
+ setCloseModal(){
+ this.isModalOpen = false;
+ setTimeout(()=>{ this.isModalOpenBackdrop= false;},1000);
}
-
amount:number =0;
fee:number = 0;
@@ -133,5 +167,11 @@ export class AddcreditPage implements OnInit {
// this.total = this.fee + this.amount;
+ }
+
+ processPayment(processor){
+
+
+
}
}
diff --git a/src/app/services/wrench.service.ts b/src/app/services/wrench.service.ts
index 0ae5629..d056d9f 100644
--- a/src/app/services/wrench.service.ts
+++ b/src/app/services/wrench.service.ts
@@ -269,6 +269,11 @@ export class WrenchService {
return this.getPostData("familytransfer", reqData);
}
+ startCredit(reqData){
+ return this.getPostData("startcredit", reqData);
+ }
+
+
familySuggestList(usrData){
return this.getPostData("familysuggestlist", usrData);
}