feat(medusa): manage payment sessions from payment collection (#2402)

* feat: manage payment sessions from payment collection
This commit is contained in:
Carlos R. L. Rodrigues
2022-11-02 13:34:29 -03:00
committed by GitHub
parent a014e3623c
commit c3f8297599
28 changed files with 2002 additions and 1315 deletions
+24 -16
View File
@@ -1,59 +1,67 @@
import { AbstractPaymentService } from "@medusajs/medusa";
import { AbstractPaymentService } from "@medusajs/medusa"
class TestPayService extends AbstractPaymentService {
static identifier = "test-pay";
static identifier = "test-pay"
constructor(_) {
super(_);
super(_)
}
async getStatus(paymentData) {
return "authorized";
return "authorized"
}
async retrieveSavedMethods(customer) {
return Promise.resolve([]);
return Promise.resolve([])
}
async createPayment() {
return {};
return {}
}
async createPaymentNew() {
return {}
}
async retrievePayment(data) {
return {};
return {}
}
async getPaymentData(sessionData) {
return {};
return {}
}
async authorizePayment(sessionData, context = {}) {
return {};
return {}
}
async updatePaymentData(sessionData, update) {
return {};
return {}
}
async updatePayment(sessionData, cart) {
return {};
return {}
}
async updatePaymentNew(sessionData, paymentInput) {
return {}
}
async deletePayment(payment) {
return {};
return {}
}
async capturePayment(payment) {
return {};
return {}
}
async refundPayment(payment, amountToRefund) {
return {};
return {}
}
async cancelPayment(payment) {
return {};
return {}
}
}
export default TestPayService;
export default TestPayService