-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
c97ccd3
commit 80e0213
Showing
3 changed files
with
60 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@medusajs/medusa": patch | ||
--- | ||
|
||
Convert SystemPaymentProvider to TypeScript |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |