mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-01 11:13:26 +00:00
fix: ( payment ) change the amount to number
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
IsEnum,
|
||||
IsIn,
|
||||
IsInt,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsPositive,
|
||||
IsString,
|
||||
@@ -46,9 +46,9 @@ export class InitiatePaymentRequestDto implements InitiatePaymentRequest {
|
||||
|
||||
@ApiProperty({
|
||||
description:
|
||||
"Authoritative amount in minor units, computed server-side by the app",
|
||||
"Authoritative amount computed server-side by the app. Accepts decimals "
|
||||
})
|
||||
@IsInt()
|
||||
@IsNumber()
|
||||
@IsPositive()
|
||||
amountMinor!: number;
|
||||
|
||||
|
||||
@@ -71,12 +71,16 @@ export class PaymentIntent extends BaseEntity {
|
||||
})
|
||||
providerTxnId?: string | null;
|
||||
|
||||
/** App-asserted authoritative amount in minor units. */
|
||||
@Column({ name: "amount_minor", type: "integer" })
|
||||
/** App-asserted authoritative amount (real/major price; may be fractional, e.g. 10.50). */
|
||||
@Column({ name: "amount_minor", type: "double precision" })
|
||||
amountMinor!: number;
|
||||
|
||||
/** Provider-reported amount; reconciled against amount_minor (e.g. Waafi truncates decimals). */
|
||||
@Column({ name: "confirmed_amount_minor", type: "integer", nullable: true })
|
||||
@Column({
|
||||
name: "confirmed_amount_minor",
|
||||
type: "double precision",
|
||||
nullable: true,
|
||||
})
|
||||
confirmedAmountMinor?: number | null;
|
||||
|
||||
@Column({ name: "currency", type: "varchar", length: 8 })
|
||||
|
||||
Reference in New Issue
Block a user