docs: Update Payment Provider documentation (#2057)
This commit is contained in:
1 parent
4d4aa68898
commit
d38a4fb927
3 files changed
+8
-3
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Update Payment Provider documentation to use new AbstractPaymentService interface
|
||||||
@@ -8,7 +8,7 @@ A Payment Provider is the payment method used to authorize, capture, and refund
|
|||||||
|
|
||||||
By default, Medusa has a [manual payment provider](https://github.com/medusajs/medusa/tree/master/packages/medusa-payment-manual) that has minimal implementation. It can be synonymous with a Cash on Delivery payment method. It allows store operators to manage the payment themselves but still keep track of its different stages on Medusa.
|
By default, Medusa has a [manual payment provider](https://github.com/medusajs/medusa/tree/master/packages/medusa-payment-manual) that has minimal implementation. It can be synonymous with a Cash on Delivery payment method. It allows store operators to manage the payment themselves but still keep track of its different stages on Medusa.
|
||||||
|
|
||||||
Adding a Payment Provider is as simple as creating a [service](../services/create-service.md) file in `src/services`. A Payment Provider is essentially a service that extends `PaymentService` from `medusa-interfaces`.
|
Adding a Payment Provider is as simple as creating a [service](../services/create-service.md) file in `src/services`. A Payment Provider is essentially a service that extends `AbstractPaymentService` from the core Medusa package `@medusajs/medusa`.
|
||||||
|
|
||||||
Payment Provider Services must have a static property `identifier`. It is the name that will be used to install and refer to the Payment Provider in the Medusa server.
|
Payment Provider Services must have a static property `identifier`. It is the name that will be used to install and refer to the Payment Provider in the Medusa server.
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ export default MyPaymentService;
|
|||||||
|
|
||||||
Where `MyPaymentService` is the name of your Payment Provider service. For example, Stripe’s Payment Provider Service is called `StripeProviderService`.
|
Where `MyPaymentService` is the name of your Payment Provider service. For example, Stripe’s Payment Provider Service is called `StripeProviderService`.
|
||||||
|
|
||||||
Payment Providers must extend `PaymentService` from `medusa-interfaces`.
|
Payment Providers must extend `AbstractPaymentService` from the core Medusa package `@medusajs/medusa`.
|
||||||
|
|
||||||
:::tip
|
:::tip
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ Payment Providers can also be related to a custom way of handling payment operat
|
|||||||
|
|
||||||
### How Payment Provider is Created
|
### How Payment Provider is Created
|
||||||
|
|
||||||
A Payment Provider is essentially a Medusa [service](../services/create-service.md) with a unique identifier, and it extends the `PaymentService` provided by the `medusa-interfaces` package. It can be created as part of a [plugin](../plugins/overview.md), or it can be created just as a service file in your Medusa server.
|
A Payment Provider is essentially a Medusa [service](../services/create-service.md) with a unique identifier, and it extends the ``AbstractPaymentService` from the core Medusa package `@medusajs/medusa`. It can be created as part of a [plugin](../plugins/overview.md), or it can be created just as a service file in your Medusa server.
|
||||||
|
|
||||||
As a developer, you will mainly work with the Payment Provider when integrating a payment method in Medusa.
|
As a developer, you will mainly work with the Payment Provider when integrating a payment method in Medusa.
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user