Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix payment processor reference #7965

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs-util/packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
},
"scripts": {
"build": "tsc",
"generate:announcement": "ts-node ./doc-change-release.ts",
"generate:reference": "ts-node ./generate-reference.ts",
"generate:announcement": "node --loader ts-node/esm ./doc-change-release.ts",
"generate:reference": "node --loader ts-node/esm ./generate-reference.ts",
"merge:references": "yarn generate:reference merge",
"check:freshness": "ts-node ./freshness-check.ts",
"generate:message": "ts-node ./get-generate-diff-message.ts",
"check:freshness": "node --loader ts-node/esm ./freshness-check.ts",
"generate:message": "node --loader ts-node/esm ./get-generate-diff-message.ts",
"check:release-commit": "node ./dist/check-release-commit.js",
"generate:changeset": "node ./dist/run-changeset.js"
},
Expand Down
8 changes: 4 additions & 4 deletions docs-util/typedoc-json-output/payment.json
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@
"content": [
{
"kind": "code",
"text": "```ts\nimport {\n PaymentContext,\n PaymentSessionResponse,\n // ...\n} from \"@medusajs/medusa\"\n\nclass MyPaymentService extends AbstractPaymentProcessor {\n // ...\n async initiatePayment(\n context: PaymentProcessorContext\n ): Promise<\n PaymentProcessorError | PaymentProcessorSessionResponse\n > {\n // assuming client is an initialized client\n // communicating with a third-party service.\n const clientPayment = await this.client.initiate(context)\n\n return {\n session_data: {\n id: clientPayment.id\n },\n }\n }\n}\n```"
"text": "```ts\nimport {\n PaymentProcessorContext,\n PaymentProcessorSessionResponse,\n // ...\n} from \"@medusajs/medusa\"\n\nclass MyPaymentService extends AbstractPaymentProcessor {\n // ...\n async initiatePayment(\n context: PaymentProcessorContext\n ): Promise<\n PaymentProcessorError | PaymentProcessorSessionResponse\n > {\n // assuming client is an initialized client\n // communicating with a third-party service.\n const clientPayment = await this.client.initiate(context)\n\n return {\n session_data: {\n id: clientPayment.id\n },\n }\n }\n}\n```"
}
]
}
Expand Down Expand Up @@ -2398,7 +2398,7 @@
"summary": [
{
"kind": "text",
"text": "If this fulfillment provider is created in a plugin, the plugin's options are passed in this parameter."
"text": "If this payment processor is created in a plugin, the plugin's options are passed in this parameter."
}
]
},
Expand Down Expand Up @@ -2491,7 +2491,7 @@
"summary": [
{
"kind": "text",
"text": "If this fulfillment provider is created in a plugin, the plugin's options are passed in this parameter."
"text": "If this payment processor is created in a plugin, the plugin's options are passed in this parameter."
}
]
},
Expand Down Expand Up @@ -3194,7 +3194,7 @@
"content": [
{
"kind": "code",
"text": "```ts\nimport {\n PaymentContext,\n PaymentSessionResponse,\n // ...\n} from \"@medusajs/medusa\"\n\nclass MyPaymentService extends AbstractPaymentProcessor {\n // ...\n async initiatePayment(\n context: PaymentProcessorContext\n ): Promise<\n PaymentProcessorError | PaymentProcessorSessionResponse\n > {\n // assuming client is an initialized client\n // communicating with a third-party service.\n const clientPayment = await this.client.initiate(context)\n\n return {\n session_data: {\n id: clientPayment.id\n },\n }\n }\n}\n```"
"text": "```ts\nimport {\n PaymentProcessorContext,\n PaymentProcessorSessionResponse,\n // ...\n} from \"@medusajs/medusa\"\n\nclass MyPaymentService extends AbstractPaymentProcessor {\n // ...\n async initiatePayment(\n context: PaymentProcessorContext\n ): Promise<\n PaymentProcessorError | PaymentProcessorSessionResponse\n > {\n // assuming client is an initialized client\n // communicating with a third-party service.\n const clientPayment = await this.client.initiate(context)\n\n return {\n session_data: {\n id: clientPayment.id\n },\n }\n }\n}\n```"
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions packages/medusa/src/interfaces/payment-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ export interface PaymentProcessor {
*
* @example
* import {
* PaymentContext,
* PaymentSessionResponse,
* PaymentProcessorContext,
* PaymentProcessorSessionResponse,
* // ...
* } from "@medusajs/medusa"
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class MyFulfillmentService extends AbstractFulfillmentService {
async validateOption(
data: Record<string, unknown>
): Promise<boolean> {
return data.id === "my-fulfillment"
return data.id == "my-fulfillment"
}
}
```
Expand Down
Loading
Loading