docs: update imports and package names across docs (#9375)
* docs: update imports and package names across docs + reference configs * generate files * fix import * change preview to rc
This commit is contained in:
1 parent
c726ed54f5
commit
2e16949979
196 files changed
+1379
-1491
No files matched your search
@@ -30,7 +30,7 @@ The Payment Module provides a `system` payment provider that acts as a placehold
|
||||
|
||||
## How are Payment Providers Created?
|
||||
|
||||
A payment provider is a TypeScript or JavaScript class that extends the `AbstractPaymentProvider` imported from `@medusajs/utils`. It can then be exported as the main service of a module.
|
||||
A payment provider is a TypeScript or JavaScript class that extends the `AbstractPaymentProvider` imported from `@medusajs/framework/utils`. It can then be exported as the main service of a module.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ These features are also available in a safe test environment, allowing for a con
|
||||
|
||||
---
|
||||
|
||||
## Install the Stripe Module Provider
|
||||
## Register the Stripe Module Provider
|
||||
|
||||
<Prerequisites items={[
|
||||
{
|
||||
@@ -37,22 +37,10 @@ These features are also available in a safe test environment, allowing for a con
|
||||
}
|
||||
]} />
|
||||
|
||||
To install the Stripe Module Provider, run the following command in the directory of your Medusa application:
|
||||
|
||||
```bash npm2yarn
|
||||
npm install @medusajs/payment-stripe@preview
|
||||
```
|
||||
|
||||
<Note>
|
||||
|
||||
Make sure that the version added in `package.json` is `preview` to avoid errors with installation and updates in the future.
|
||||
|
||||
</Note>
|
||||
|
||||
Next, add the module to the array of providers passed to the Payment Module:
|
||||
Add the module to the array of providers passed to the Payment Module:
|
||||
|
||||
```js title="medusa-config.js"
|
||||
const { Modules } = require("@medusajs/utils")
|
||||
const { Modules } = require("@medusajs/framework/utils")
|
||||
|
||||
// ...
|
||||
|
||||
@@ -60,11 +48,11 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: {
|
||||
[Modules.PAYMENT]: {
|
||||
resolve: "@medusajs/payment",
|
||||
resolve: "@medusajs/medusa/payment",
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
resolve: "@medusajs/payment-stripe",
|
||||
resolve: "@medusajs/medusa/payment-stripe",
|
||||
id: "stripe",
|
||||
options: {
|
||||
apiKey: process.env.STRIPE_API_KEY,
|
||||
|
||||
Reference in new issue
Block a user