feat(medusa,medusa-react): PaymentCollection support (#2659)

* chore: medusa react, order edit complete fix and single payment session
This commit is contained in:
Carlos R. L. Rodrigues
2022-12-07 12:39:35 -03:00
committed by GitHub
parent 42d9c7222b
commit 15c667fbd3
54 changed files with 2001 additions and 261 deletions
+3
View File
@@ -19,3 +19,6 @@ export * from "./simple-batch-job-factory"
export * from "./simple-sales-channel-factory"
export * from "./simple-custom-shipping-option-factory"
export * from "./simple-payment-collection-factory"
export * from "./simple-order-edit-factory"
export * from "./simple-order-item-change-factory"
export * from "./simple-customer-factory"
@@ -11,6 +11,7 @@ export type CustomerFactoryData = {
email?: string
groups?: CustomerGroupFactoryData[]
password_hash?: string
has_account?: boolean
}
export const simpleCustomerFactory = async (
@@ -28,6 +29,10 @@ export const simpleCustomerFactory = async (
const c = manager.create(Customer, {
id: customerId,
email: data.email,
password_hash:
data.password_hash ??
"c2NyeXB0AAEAAAABAAAAAVMdaddoGjwU1TafDLLlBKnOTQga7P2dbrfgf3fB+rCD/cJOMuGzAvRdKutbYkVpuJWTU39P7OpuWNkUVoEETOVLMJafbI8qs8Qx/7jMQXkN", // password matching "test"
has_account: data.has_account ?? true,
})
if (data.password_hash) {