chore(*-payment-*): Cleanup PaymentProvider plugins (#3011)
This commit is contained in:
1 parent
0a2bf7845d
commit
ce866475b4
6 files changed
+25
-129
No files matched your search
@@ -1,8 +1,7 @@
|
||||
import axios from "axios"
|
||||
import _ from "lodash"
|
||||
import { hmacValidator } from "@adyen/api-library"
|
||||
import { CheckoutAPI, Client, Config, hmacValidator } from "@adyen/api-library"
|
||||
import { BaseService } from "medusa-interfaces"
|
||||
import { Client, Config, CheckoutAPI } from "@adyen/api-library"
|
||||
|
||||
class AdyenService extends BaseService {
|
||||
constructor({ cartService }, options) {
|
||||
@@ -201,10 +200,6 @@ class AdyenService extends BaseService {
|
||||
return { cart_id: cart.id }
|
||||
}
|
||||
|
||||
async createPaymentNew(paymentInput) {
|
||||
return { resource_id: paymentInput.resource_id }
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves Adyen payment. This is not supported by adyen, so we simply
|
||||
* return the current payment method data
|
||||
@@ -326,10 +321,6 @@ class AdyenService extends BaseService {
|
||||
return paymentData
|
||||
}
|
||||
|
||||
async updatePaymentNew(paymentData, details) {
|
||||
return paymentData
|
||||
}
|
||||
|
||||
/**
|
||||
* Additional details
|
||||
* @param {object} paymentData - payment data
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import _ from "lodash"
|
||||
import { PaymentService } from "medusa-interfaces"
|
||||
|
||||
class MobilePayAdyenService extends PaymentService {
|
||||
@@ -20,12 +19,6 @@ class MobilePayAdyenService extends PaymentService {
|
||||
return raw
|
||||
}
|
||||
|
||||
async createPaymentNew(paymentInput) {
|
||||
const raw = await this.adyenService_.createPaymentNew(paymentInput)
|
||||
raw.type = "mobilepay"
|
||||
return raw
|
||||
}
|
||||
|
||||
async authorizePayment(sessionData, context) {
|
||||
return this.adyenService_.authorizePayment(sessionData, context)
|
||||
}
|
||||
@@ -38,10 +31,6 @@ class MobilePayAdyenService extends PaymentService {
|
||||
return this.adyenService_.updatePayment(data)
|
||||
}
|
||||
|
||||
async updatePaymentNew(data, _) {
|
||||
return this.adyenService_.updatePaymentNew(data)
|
||||
}
|
||||
|
||||
async updatePaymentData(sessionData, update) {
|
||||
return this.adyenService_.updatePaymentData(sessionData, update)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user