feat(medusa): Convert SystemPaymentProvider to TypeScript (#1988)
**What** - convert system payment provider to typescript Fixes CORE-397 Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/medusa": patch
|
||||
---
|
||||
|
||||
Convert SystemPaymentProvider to TypeScript
|
||||
@@ -1,51 +0,0 @@
|
||||
import { TransactionBaseService } from "../interfaces"
|
||||
|
||||
class SystemProviderService extends TransactionBaseService {
|
||||
static identifier = "system"
|
||||
|
||||
constructor(_) {
|
||||
super(_)
|
||||
}
|
||||
|
||||
async createPayment(_) {
|
||||
return {}
|
||||
}
|
||||
|
||||
async getStatus(_) {
|
||||
return "authorized"
|
||||
}
|
||||
|
||||
async getPaymentData(_) {
|
||||
return {}
|
||||
}
|
||||
|
||||
async authorizePayment(_) {
|
||||
return { data: {}, status: "authorized" }
|
||||
}
|
||||
|
||||
async updatePaymentData(_) {
|
||||
return {}
|
||||
}
|
||||
|
||||
async updatePayment(_) {
|
||||
return {}
|
||||
}
|
||||
|
||||
async deletePayment(_) {
|
||||
return {}
|
||||
}
|
||||
|
||||
async capturePayment(_) {
|
||||
return {}
|
||||
}
|
||||
|
||||
async refundPayment(_) {
|
||||
return {}
|
||||
}
|
||||
|
||||
async cancelPayment(_) {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
|
||||
export default SystemProviderService
|
||||
@@ -0,0 +1,55 @@
|
||||
import { EntityManager } from "typeorm"
|
||||
import { TransactionBaseService } from "../interfaces/transaction-base-service"
|
||||
|
||||
class SystemProviderService extends TransactionBaseService {
|
||||
protected manager_: EntityManager
|
||||
protected transactionManager_: EntityManager | undefined
|
||||
|
||||
static identifier = "system"
|
||||
|
||||
constructor(_) {
|
||||
super(_)
|
||||
}
|
||||
|
||||
async createPayment(_): Promise<Record<string, unknown>> {
|
||||
return {}
|
||||
}
|
||||
|
||||
async getStatus(_): Promise<string> {
|
||||
return "authorized"
|
||||
}
|
||||
|
||||
async getPaymentData(_): Promise<Record<string, unknown>> {
|
||||
return {}
|
||||
}
|
||||
|
||||
async authorizePayment(_): Promise<Record<string, unknown>> {
|
||||
return { data: {}, status: "authorized" }
|
||||
}
|
||||
|
||||
async updatePaymentData(_): Promise<Record<string, unknown>> {
|
||||
return {}
|
||||
}
|
||||
|
||||
async updatePayment(_): Promise<Record<string, unknown>> {
|
||||
return {}
|
||||
}
|
||||
|
||||
async deletePayment(_): Promise<Record<string, unknown>> {
|
||||
return {}
|
||||
}
|
||||
|
||||
async capturePayment(_): Promise<Record<string, unknown>> {
|
||||
return {}
|
||||
}
|
||||
|
||||
async refundPayment(_): Promise<Record<string, unknown>> {
|
||||
return {}
|
||||
}
|
||||
|
||||
async cancelPayment(_): Promise<Record<string, unknown>> {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
|
||||
export default SystemProviderService
|
||||
Reference in New Issue
Block a user