diff --git a/pay_xero_invoice.txt b/pay_xero_invoice.txt new file mode 100644 index 0000000..45e3b11 --- /dev/null +++ b/pay_xero_invoice.txt @@ -0,0 +1,41 @@ +{ + "Invoice": { "InvoiceID": "96df0dff-43ec-4899-a7d9-e9d63ef12b19" }, + "Account": { "Code": "001" }, + "Date": "2022-08-25", + "Amount": 32.06 +} + + +{ + "Invoice": { "InvoiceNumber": "INV-0041" }, + "Account": { "Code": "001" }, + "Date": "2022-08-25", + "Amount": 32.06 +} + + +POST -> https://api.xero.com/api.xro/2.0/Payments + +Authorization Bearer ey**** +Xero-Tenant-Id 5ae23193-e4b4-4001-99e9-b98634d6040e +Accept application/json +Content-Type application/json + + +Payload + +{ + "Payments": [ + { + "Invoice": { + "LineItems": [], + "InvoiceID": "00000000-0000-0000-0000-000000000000" + }, + "Account": { + "Code": "970" + }, + "Date": "2019-03-12", + "Amount": 1 + } + ] +} \ No newline at end of file diff --git a/src/app/order/order.service.ts b/src/app/order/order.service.ts index 251688f..229e0b6 100644 --- a/src/app/order/order.service.ts +++ b/src/app/order/order.service.ts @@ -53,7 +53,6 @@ export class OrderService { viewkey: '' }, order: { - _id: '', address: '', session: '', timestamp: '', diff --git a/src/app/settings/settings.component.html b/src/app/settings/settings.component.html index caa677c..1d7b4da 100644 --- a/src/app/settings/settings.component.html +++ b/src/app/settings/settings.component.html @@ -45,13 +45,14 @@ formControlName="vKey"> + diff --git a/src/app/settings/settings.component.ts b/src/app/settings/settings.component.ts index 0914d25..21bf402 100644 --- a/src/app/settings/settings.component.ts +++ b/src/app/settings/settings.component.ts @@ -54,14 +54,14 @@ export class SettingsComponent implements OnInit { currency: [data.currency, Validators.required], useZats: [data.zats, Validators.required], useVKey: [data.payconf, Validators.required], - proVersion: [data.invoices, Validators.required], +// proVersion: [data.invoices, Validators.required], vKey: [data.viewkey] }); if (data.payconf) { this.settingsForm.get('vKey')!.enable(); } this.owner = data; - + this.proVersion = this.owner.invoices; this.clientIdUpdate = xeroService.clientIdUpdate; xeroService.getXeroConfig(); this.clientIdUpdate.subscribe(clientId => {