docs: changed details related to new payment method signatures (#2876)

* docs: changed details related to new method signatures

* updated the information regarding update_requests

* small changes to the text

* lint fixes

* fixed constructor

* fixes based on review
This commit is contained in:
Shahed Nasser
2023-01-05 11:55:27 +02:00
committed by GitHub
parent af7e67e827
commit 8ba27a2e28
2 changed files with 155 additions and 86 deletions
@@ -76,20 +76,20 @@ Although this change is currently backwards compatible, it is recommended to cha
<!-- eslint-disable max-len -->
```ts
import { PaymentContext, PaymentSessionResponse } from "@medusajs/medusa"
import { Cart, PaymentSessionData, PaymentContext, PaymentSessionResponse } from "@medusajs/medusa"
// ...
class MyPaymentService extends AbstractPaymentService<TransactionBaseService> {
// ...
async createPayment(
context: PaymentContext
context: Cart & PaymentContext
): Promise<PaymentSessionResponse> {
// ...
}
async updatePayment(
paymentSessionData: PaymentSessionData,
context: PaymentContext
context: Cart & PaymentContext
): Promise<PaymentSessionResponse> {
// ...
}