chore(integration-tests): Fixed merge conflict

This commit is contained in:
olivermrbl
2022-08-25 16:04:49 +02:00
212 changed files with 6791 additions and 3775 deletions

View File

@@ -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.
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.
@@ -47,9 +47,9 @@ These methods are used at different points in the Checkout flow as well as when
The first step to create a payment provider is to create a file in `src/services` with the following content:
```jsx
import { PaymentService } from "medusa-interfaces"
import { AbstractPaymentService } from "@medusajs/medusa"
class MyPaymentService extends PaymentService {
class MyPaymentService extends AbstractPaymentService {
}
@@ -58,7 +58,7 @@ export default MyPaymentService;
Where `MyPaymentService` is the name of your Payment Provider service. For example, Stripes 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

View File

@@ -24,7 +24,7 @@ Payment Providers can also be related to a custom way of handling payment operat
### 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.

View File

@@ -0,0 +1,39 @@
# v1.3.6
Following the addition of feature flags in version v1.3.3 and the addition of the Sales Channels API in v1.3.5, v1.3.6 introduces a data migration script that moves all products into the Default Sales Channel.
:::note
In version 1.3.6, Sales Channels are available but hidden behind feature flags. If you dont have Sales Channels enabled, you dont need to follow the steps detailed in this migration script.
:::
## Prerequisites
Before performing the actions mentioned in this guide, you must set the following environment variables:
```bash
TYPEORM_CONNECTION=postgres
TYPEORM_URL=<DATABASE_URL>
TYPEORM_LOGGING=true
TYPEORM_ENTITIES=./node_modules/@medusajs/medusa/dist/models/*.js
TYPEORM_MIGRATIONS=./node_modules/@medusajs/medusa/dist/migrations/*.js
```
These environment variables are used in the data migration scripts in this upgrade. Make sure to replace `<DATABASE_URL>` with your PostgreSQL database URL.
## Sales Channels
Sales Channels were introduced in v1.3.5 behind a feature flag. By enabling Sales Channels, developers and users can associate products and other entities with a specific Sales Channel.
However, if you upgraded Medusa to v1.3.5 and enabled Sales Channels, you must add every product to at least one Sales Channel manually. Otherwise, products cant be added to carts in different Sales Channels.
v1.3.6 introduces a data migration script that automates this process for you by moving all your products into a default Sales Channel. This ensures that you can use the Sales Channels feature without it affecting the user experience in your store.
### Actions Required
If youve enabled Sales Channels, its essential to run the data migration script after upgrading your server and before starting your Medusa server:
```bash
node ./node_modules/@medusajs/medusa/dist/scripts/sales-channels-migration.js
```