mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
changes
This commit is contained in:
@@ -61,6 +61,9 @@ export class DMoneyProvider implements PaymentProvider {
|
||||
): Promise<ProviderInitiationResult> {
|
||||
const fabricToken = await this.applyFabricToken();
|
||||
const requestBody = this.buildPreOrderRequest(input);
|
||||
this.logger.log(
|
||||
`D-Money preOrder send request merchOrderId=${input.merchantOrderId} body=${JSON.stringify(this.sanitize(requestBody))}`,
|
||||
);
|
||||
const response = await this.postJson<DMoneyPreOrderResponse>(
|
||||
`${this.baseUrl}/apiaccess/payment/gateway/payment/v1/merchant/preOrder`,
|
||||
requestBody,
|
||||
@@ -208,7 +211,7 @@ export class DMoneyProvider implements PaymentProvider {
|
||||
merch_order_id: input.merchantOrderId,
|
||||
trade_type: "WebCheckout" as const,
|
||||
business_type: "OnlineMerchant" as const,
|
||||
title: `${input.orderRef}`,
|
||||
title: "EDR booking payment",
|
||||
total_amount: totalAmount,
|
||||
// Charge the currency the caller already converted to; never relabel it provider-side.
|
||||
trans_currency: input.currency,
|
||||
|
||||
@@ -132,11 +132,17 @@ export enum PaymentStatus {
|
||||
|
||||
export enum InvoiceStatus {
|
||||
Draft = "DRAFT",
|
||||
/** Issued and awaiting payment (alias of PENDING for fee invoices). */
|
||||
Issued = "ISSUED",
|
||||
Pending = "PENDING",
|
||||
/** Some, but not all, of the balance has been settled. */
|
||||
PartiallyPaid = "PARTIALLY_PAID",
|
||||
Paid = "PAID",
|
||||
Overdue = "OVERDUE",
|
||||
Cancelled = "CANCELLED",
|
||||
Refunded = "REFUNDED",
|
||||
/** Pay window closed before settlement; terminal, cannot be paid. */
|
||||
Expired = "EXPIRED",
|
||||
}
|
||||
|
||||
/** Originating subsystem an invoice bills for; namespaces invoice events. */
|
||||
@@ -144,14 +150,8 @@ export enum InvoiceSource {
|
||||
Booking = "booking",
|
||||
Warehouse = "warehouse",
|
||||
Demurrage = "demurrage",
|
||||
}
|
||||
|
||||
/**
|
||||
* What an invoice bills for within its source — the discriminator when one
|
||||
* entity carries several invoices (e.g. a booking's up-front vs final charge).
|
||||
*/
|
||||
export enum InvoiceType {
|
||||
Prepaid = "PREPAID",
|
||||
FirstMile = "firstmile",
|
||||
LastMile = "lastmile"
|
||||
}
|
||||
|
||||
export enum SchedulingStatus {
|
||||
|
||||
Reference in New Issue
Block a user