@vendure/payments-plugin 2.3.3 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,39 +1,39 @@
1
- # Payments plugin
2
-
3
- For documentation, see [docs.vendure.io/reference/core-plugins/payments-plugin/](https://docs.vendure.io/reference/core-plugins/payments-plugin/)
4
-
5
- ## Development
6
-
7
- ### Mollie local development
8
-
9
- For testing out changes to the Mollie plugin locally, with a real Mollie account, follow the steps below. These steps
10
- will create an order, set Mollie as payment method, and create a payment intent link to the Mollie platform.
11
-
12
- 1. Get a test api key from your Mollie
13
- dashboard: https://help.mollie.com/hc/en-us/articles/115000328205-Where-can-I-find-the-API-key-
14
- 2. Create the file `packages/payments-plugin/.env` with content `MOLLIE_APIKEY=your-test-apikey`
15
- 3. `cd packages/payments-plugin`
16
- 5. `npm run dev-server:mollie`
17
- 6. Watch the logs for `Mollie payment link` and click the link to finalize the test payment.
18
-
19
- You can change the order flow, payment methods and more in the file `e2e/mollie-dev-server`, and restart the devserver.
20
-
21
- ### Stripe local development
22
-
23
- For testing out changes to the Stripe plugin locally, with a real Stripe account, follow the steps below. These steps
24
- will create an order, set Stripe as payment method, and create a payment secret.
25
-
26
- 1. Get a test api key from your Stripe
27
- dashboard: https://dashboard.stripe.com/test/apikeys
28
- 2. Use Ngrok or Localtunnel to make your localhost publicly available and create a webhook as described here: https://www.vendure.io/docs/typescript-api/payments-plugin/stripe-plugin/
29
- 3. Create the file `packages/payments-plugin/.env` with these contents:
30
- ```sh
31
- STRIPE_APIKEY=sk_test_xxxx
32
- STRIPE_WEBHOOK_SECRET=webhook-secret
33
- STRIPE_PUBLISHABLE_KEY=pk_test_xxxx
34
- ```
35
- 1. `cd packages/payments-plugin`
36
- 2. `yarn dev-server:stripe`
37
- 3. Watch the logs for the link or go to `http://localhost:3050/checkout` to test the checkout.
38
-
39
- After checkout completion you can see your payment in https://dashboard.stripe.com/test/payments/
1
+ # Payments plugin
2
+
3
+ For documentation, see [docs.vendure.io/reference/core-plugins/payments-plugin/](https://docs.vendure.io/reference/core-plugins/payments-plugin/)
4
+
5
+ ## Development
6
+
7
+ ### Mollie local development
8
+
9
+ For testing out changes to the Mollie plugin locally, with a real Mollie account, follow the steps below. These steps
10
+ will create an order, set Mollie as payment method, and create a payment intent link to the Mollie platform.
11
+
12
+ 1. Get a test api key from your Mollie
13
+ dashboard: https://help.mollie.com/hc/en-us/articles/115000328205-Where-can-I-find-the-API-key-
14
+ 2. Create the file `packages/payments-plugin/.env` with content `MOLLIE_APIKEY=your-test-apikey`
15
+ 3. `cd packages/payments-plugin`
16
+ 5. `npm run dev-server:mollie`
17
+ 6. Watch the logs for `Mollie payment link` and click the link to finalize the test payment.
18
+
19
+ You can change the order flow, payment methods and more in the file `e2e/mollie-dev-server`, and restart the devserver.
20
+
21
+ ### Stripe local development
22
+
23
+ For testing out changes to the Stripe plugin locally, with a real Stripe account, follow the steps below. These steps
24
+ will create an order, set Stripe as payment method, and create a payment secret.
25
+
26
+ 1. Get a test api key from your Stripe
27
+ dashboard: https://dashboard.stripe.com/test/apikeys
28
+ 2. Use Ngrok or Localtunnel to make your localhost publicly available and create a webhook as described here: https://www.vendure.io/docs/typescript-api/payments-plugin/stripe-plugin/
29
+ 3. Create the file `packages/payments-plugin/.env` with these contents:
30
+ ```sh
31
+ STRIPE_APIKEY=sk_test_xxxx
32
+ STRIPE_WEBHOOK_SECRET=webhook-secret
33
+ STRIPE_PUBLISHABLE_KEY=pk_test_xxxx
34
+ ```
35
+ 1. `cd packages/payments-plugin`
36
+ 2. `yarn dev-server:stripe`
37
+ 3. Watch the logs for the link or go to `http://localhost:3050/checkout` to test the checkout.
38
+
39
+ After checkout completion you can see your payment in https://dashboard.stripe.com/test/payments/
@@ -276,10 +276,10 @@ exports.BraintreePlugin = BraintreePlugin = BraintreePlugin_1 = __decorate([
276
276
  return config;
277
277
  },
278
278
  shopApiExtensions: {
279
- schema: (0, graphql_tag_1.gql) `
280
- extend type Query {
281
- generateBraintreeClientToken(orderId: ID, includeCustomerId: Boolean): String!
282
- }
279
+ schema: (0, graphql_tag_1.gql) `
280
+ extend type Query {
281
+ generateBraintreeClientToken(orderId: ID, includeCustomerId: Boolean): String!
282
+ }
283
283
  `,
284
284
  resolvers: [braintree_resolver_1.BraintreeResolver],
285
285
  },
@@ -2,85 +2,85 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.adminApiExtensions = exports.shopApiExtensions = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
- const commonSchemaExtensions = (0, graphql_tag_1.gql) `
6
-
7
- input MolliePaymentIntentInput {
8
- """
9
- The code of the Vendure payment method to use for the payment.
10
- Must have Mollie as payment method handler.
11
- Without this, the first method with Mollie as handler will be used.
12
- """
13
- paymentMethodCode: String
14
- """
15
- The redirect url to which the customer will be redirected after the payment is completed.
16
- The configured fallback redirect will be used if this is not provided.
17
- """
18
- redirectUrl: String
19
- """
20
- Optional preselected Mollie payment method. When this is passed
21
- the payment selection step will be skipped.
22
- """
23
- molliePaymentMethodCode: String
24
- """
25
- Use this to create a payment intent for a specific order. This allows you to create intents for
26
- orders that are not active orders.
27
- """
28
- orderId: String
29
- }
30
-
31
- type MolliePaymentIntent {
32
- url: String!
33
- }
34
-
35
- type MolliePaymentIntentError implements ErrorResult {
36
- errorCode: ErrorCode!
37
- message: String!
38
- }
39
-
40
- union MolliePaymentIntentResult = MolliePaymentIntent | MolliePaymentIntentError
41
-
42
- extend type Mutation {
43
- createMolliePaymentIntent(input: MolliePaymentIntentInput!): MolliePaymentIntentResult!
44
- }
45
-
5
+ const commonSchemaExtensions = (0, graphql_tag_1.gql) `
6
+
7
+ input MolliePaymentIntentInput {
8
+ """
9
+ The code of the Vendure payment method to use for the payment.
10
+ Must have Mollie as payment method handler.
11
+ Without this, the first method with Mollie as handler will be used.
12
+ """
13
+ paymentMethodCode: String
14
+ """
15
+ The redirect url to which the customer will be redirected after the payment is completed.
16
+ The configured fallback redirect will be used if this is not provided.
17
+ """
18
+ redirectUrl: String
19
+ """
20
+ Optional preselected Mollie payment method. When this is passed
21
+ the payment selection step will be skipped.
22
+ """
23
+ molliePaymentMethodCode: String
24
+ """
25
+ Use this to create a payment intent for a specific order. This allows you to create intents for
26
+ orders that are not active orders.
27
+ """
28
+ orderId: String
29
+ }
30
+
31
+ type MolliePaymentIntent {
32
+ url: String!
33
+ }
34
+
35
+ type MolliePaymentIntentError implements ErrorResult {
36
+ errorCode: ErrorCode!
37
+ message: String!
38
+ }
39
+
40
+ union MolliePaymentIntentResult = MolliePaymentIntent | MolliePaymentIntentError
41
+
42
+ extend type Mutation {
43
+ createMolliePaymentIntent(input: MolliePaymentIntentInput!): MolliePaymentIntentResult!
44
+ }
45
+
46
46
  `;
47
- exports.shopApiExtensions = (0, graphql_tag_1.gql) `
48
-
49
- ${commonSchemaExtensions}
50
-
51
- type MollieAmount {
52
- value: String
53
- currency: String
54
- }
55
- type MolliePaymentMethodImages {
56
- size1x: String
57
- size2x: String
58
- svg: String
59
- }
60
- type MolliePaymentMethod {
61
- id: ID!
62
- code: String!
63
- description: String
64
- minimumAmount: MollieAmount
65
- maximumAmount: MollieAmount
66
- image: MolliePaymentMethodImages
67
- status: String
68
- }
69
-
70
- input MolliePaymentMethodsInput {
71
- paymentMethodCode: String!
72
- }
73
-
74
- extend type Query {
75
- molliePaymentMethods(input: MolliePaymentMethodsInput!): [MolliePaymentMethod!]!
76
- }
47
+ exports.shopApiExtensions = (0, graphql_tag_1.gql) `
48
+
49
+ ${commonSchemaExtensions}
50
+
51
+ type MollieAmount {
52
+ value: String
53
+ currency: String
54
+ }
55
+ type MolliePaymentMethodImages {
56
+ size1x: String
57
+ size2x: String
58
+ svg: String
59
+ }
60
+ type MolliePaymentMethod {
61
+ id: ID!
62
+ code: String!
63
+ description: String
64
+ minimumAmount: MollieAmount
65
+ maximumAmount: MollieAmount
66
+ image: MolliePaymentMethodImages
67
+ status: String
68
+ }
69
+
70
+ input MolliePaymentMethodsInput {
71
+ paymentMethodCode: String!
72
+ }
73
+
74
+ extend type Query {
75
+ molliePaymentMethods(input: MolliePaymentMethodsInput!): [MolliePaymentMethod!]!
76
+ }
77
77
  `;
78
- exports.adminApiExtensions = (0, graphql_tag_1.gql) `
79
-
80
- ${commonSchemaExtensions}
81
-
82
- extend enum ErrorCode {
83
- ORDER_PAYMENT_STATE_ERROR
84
- }
78
+ exports.adminApiExtensions = (0, graphql_tag_1.gql) `
79
+
80
+ ${commonSchemaExtensions}
81
+
82
+ extend enum ErrorCode {
83
+ ORDER_PAYMENT_STATE_ERROR
84
+ }
85
85
  `;
86
86
  //# sourceMappingURL=api-extensions.js.map
@@ -205,10 +205,10 @@ exports.StripePlugin = StripePlugin = StripePlugin_1 = __decorate([
205
205
  return config;
206
206
  },
207
207
  shopApiExtensions: {
208
- schema: (0, graphql_tag_1.gql) `
209
- extend type Mutation {
210
- createStripePaymentIntent: String!
211
- }
208
+ schema: (0, graphql_tag_1.gql) `
209
+ extend type Mutation {
210
+ createStripePaymentIntent: String!
211
+ }
212
212
  `,
213
213
  resolvers: [stripe_resolver_1.StripeResolver],
214
214
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendure/payments-plugin",
3
- "version": "2.3.3",
3
+ "version": "2.3.4",
4
4
  "license": "MIT",
5
5
  "main": "package/index.js",
6
6
  "types": "package/index.d.ts",
@@ -46,9 +46,9 @@
46
46
  "@mollie/api-client": "^3.7.0",
47
47
  "@types/braintree": "^3.3.11",
48
48
  "@types/localtunnel": "2.0.4",
49
- "@vendure/common": "^2.3.3",
50
- "@vendure/core": "^2.3.3",
51
- "@vendure/testing": "^2.3.3",
49
+ "@vendure/common": "^2.3.4",
50
+ "@vendure/core": "^2.3.4",
51
+ "@vendure/testing": "^2.3.4",
52
52
  "braintree": "^3.22.0",
53
53
  "localtunnel": "2.0.2",
54
54
  "nock": "^13.1.4",
@@ -56,5 +56,5 @@
56
56
  "stripe": "^13.3.0",
57
57
  "typescript": "5.1.6"
58
58
  },
59
- "gitHead": "483dca6a13f4708ae9fc60f5ca8239aafcab0edb"
59
+ "gitHead": "4f4c3ae5f5505fc475c22baebcd774c1fc5a4713"
60
60
  }
package/LICENSE DELETED
@@ -1,9 +0,0 @@
1
- The MIT License
2
-
3
- Copyright (c) 2018 Michael Bromley
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.