PmtService updated
This commit is contained in:
parent
24bbbbab72
commit
8a0ceedc90
1 changed files with 11 additions and 3 deletions
|
@ -4,8 +4,9 @@ import { HttpClient, HttpParams, HttpHeaders } from "@angular/common/http";
|
||||||
import { PmtData } from "./pmtservice.model";
|
import { PmtData } from "./pmtservice.model";
|
||||||
import { XeroInvoice } from "./xeroinvoice.model";
|
import { XeroInvoice } from "./xeroinvoice.model";
|
||||||
import { Owner } from '../owner.model';
|
import { Owner } from '../owner.model';
|
||||||
import { ConfigData } from '../configdata';
|
|
||||||
import { Item } from '../items/item.model'
|
import { Item } from '../items/item.model'
|
||||||
|
import { Order } from '../order/order.model'
|
||||||
|
import { ConfigData } from '../configdata';
|
||||||
|
|
||||||
var Buffer = require('buffer/').Buffer;
|
var Buffer = require('buffer/').Buffer;
|
||||||
|
|
||||||
|
@ -112,7 +113,15 @@ export class PmtserviceComponent implements OnInit {
|
||||||
if (OwnerDataResponse.status == 200) {
|
if (OwnerDataResponse.status == 200) {
|
||||||
this.owner = OwnerDataResponse.body!.owner;
|
this.owner = OwnerDataResponse.body!.owner;
|
||||||
console.log('Owner => ' + this.owner.name );
|
console.log('Owner => ' + this.owner.name );
|
||||||
if ( this.owner.payconf == false ) {
|
//
|
||||||
|
// ==> remove "== false" for production enviroment
|
||||||
|
//
|
||||||
|
if ( this.owner.payconf == false) {
|
||||||
|
// verifiy if an order for requested invoice
|
||||||
|
// already exist, If exists, delete it and create
|
||||||
|
// a new one if it has not been paid in ZGo
|
||||||
|
// otherwise report payment
|
||||||
|
|
||||||
// process data
|
// process data
|
||||||
console.log("Owner check passed!!!");
|
console.log("Owner check passed!!!");
|
||||||
this.getXeroInvoiceData( reqData );
|
this.getXeroInvoiceData( reqData );
|
||||||
|
@ -127,7 +136,6 @@ export class PmtserviceComponent implements OnInit {
|
||||||
this.reportType = 1;
|
this.reportType = 1;
|
||||||
}
|
}
|
||||||
}});
|
}});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getXeroInvoiceData( reqData : PmtData ) {
|
getXeroInvoiceData( reqData : PmtData ) {
|
||||||
|
|
Loading…
Reference in a new issue