feat(payment, payment-stripe): Add Stripe module provider (#6311)

This commit is contained in:
Oli Juhl
2024-02-26 19:48:15 +01:00
committed by GitHub
parent ac829fc67f
commit ce39b9b66e
49 changed files with 1256 additions and 119 deletions
+6 -13
View File
@@ -14,11 +14,7 @@ import {
} from "@mikro-orm/core"
import { DAL } from "@medusajs/types"
import {
DALUtils,
generateEntityId,
optionalNumericSerializer,
} from "@medusajs/utils"
import { DALUtils, generateEntityId } from "@medusajs/utils"
import Refund from "./refund"
import Capture from "./capture"
import PaymentSession from "./payment-session"
@@ -40,13 +36,6 @@ export default class Payment {
})
amount: number
@Property({
columnType: "numeric",
nullable: true,
serializer: optionalNumericSerializer,
})
authorized_amount: number | null = null
@Property({ columnType: "text" })
currency_code: string
@@ -119,7 +108,11 @@ export default class Payment {
})
payment_collection!: PaymentCollection
@OneToOne({ owner: true, fieldName: "session_id" })
@OneToOne({
owner: true,
fieldName: "session_id",
index: "IDX_payment_payment_session_id",
})
payment_session!: PaymentSession
/** COMPUTED PROPERTIES START **/