@vendure/payments-plugin 3.2.0 → 3.2.1

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/LICENSE.md CHANGED
@@ -1,42 +1,42 @@
1
- # License
2
- Copyright (C) Vendure GmbH
3
-
4
- This software is available under two different licenses:
5
- * GNU General Public License version 3 (GPLv3) as Vendure Community Edition
6
- * Vendure Commercial License (VCL)
7
-
8
- The default Vendure license, without a valid Vendure Commercial License agreement, is the Open-Source GPLv3 license.
9
-
10
- ## GNU General Public License version 3 (GPLv3)
11
-
12
- If you decide to choose the GPLv3 license, you must comply with the following terms:
13
-
14
- This program is free software: you can redistribute it and/or modify
15
- it under the terms of the GNU General Public License as published by
16
- the Free Software Foundation, either version 3 of the License, or
17
- (at your option) any later version.
18
-
19
- This program is distributed in the hope that it will be useful,
20
- but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- GNU General Public License for more details.
23
-
24
- You should have received a copy of the GNU General Public License
25
- along with this program. If not, see <http://www.gnu.org/licenses/>.
26
-
27
- Additional permission under GNU GPL version 3 section 7:
28
-
29
- An additional exception under section 7 of the GPL is included in the plugin-exception.txt file,
30
- which allows you to distribute Vendure plugins (i.e. extensions) under a different license.
31
-
32
- ## Vendure Commercial License (VCL)
33
-
34
- Alternatively, commercial and supported versions of the program - also known as
35
- Commercial Distributions - must be used in accordance with the terms and conditions
36
- contained in a separate written agreement between you and Vendure GmbH.
37
- For more information about the Vendure Commercial License (VCL) please contact contact@vendure.io.
38
-
39
- Please see also:
40
-
41
- - [Licensing FAQ - license-faq.md](license/license-faq.md)
42
- - [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](license/gpl-3.0.txt)
1
+ # License
2
+ Copyright (C) Vendure GmbH
3
+
4
+ This software is available under two different licenses:
5
+ * GNU General Public License version 3 (GPLv3) as Vendure Community Edition
6
+ * Vendure Commercial License (VCL)
7
+
8
+ The default Vendure license, without a valid Vendure Commercial License agreement, is the Open-Source GPLv3 license.
9
+
10
+ ## GNU General Public License version 3 (GPLv3)
11
+
12
+ If you decide to choose the GPLv3 license, you must comply with the following terms:
13
+
14
+ This program is free software: you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License as published by
16
+ the Free Software Foundation, either version 3 of the License, or
17
+ (at your option) any later version.
18
+
19
+ This program is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU General Public License for more details.
23
+
24
+ You should have received a copy of the GNU General Public License
25
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
26
+
27
+ Additional permission under GNU GPL version 3 section 7:
28
+
29
+ An additional exception under section 7 of the GPL is included in the plugin-exception.txt file,
30
+ which allows you to distribute Vendure plugins (i.e. extensions) under a different license.
31
+
32
+ ## Vendure Commercial License (VCL)
33
+
34
+ Alternatively, commercial and supported versions of the program - also known as
35
+ Commercial Distributions - must be used in accordance with the terms and conditions
36
+ contained in a separate written agreement between you and Vendure GmbH.
37
+ For more information about the Vendure Commercial License (VCL) please contact contact@vendure.io.
38
+
39
+ Please see also:
40
+
41
+ - [Licensing FAQ - license-faq.md](license/license-faq.md)
42
+ - [GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - gpl-3.0.txt](license/gpl-3.0.txt)
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/
@@ -277,10 +277,10 @@ exports.BraintreePlugin = BraintreePlugin = BraintreePlugin_1 = __decorate([
277
277
  return config;
278
278
  },
279
279
  shopApiExtensions: {
280
- schema: (0, graphql_tag_1.gql) `
281
- extend type Query {
282
- generateBraintreeClientToken(orderId: ID, includeCustomerId: Boolean): String!
283
- }
280
+ schema: (0, graphql_tag_1.gql) `
281
+ extend type Query {
282
+ generateBraintreeClientToken(orderId: ID, includeCustomerId: Boolean): String!
283
+ }
284
284
  `,
285
285
  resolvers: [braintree_resolver_1.BraintreeResolver],
286
286
  },
@@ -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
@@ -206,10 +206,10 @@ exports.StripePlugin = StripePlugin = StripePlugin_1 = __decorate([
206
206
  return config;
207
207
  },
208
208
  shopApiExtensions: {
209
- schema: (0, graphql_tag_1.gql) `
210
- extend type Mutation {
211
- createStripePaymentIntent: String!
212
- }
209
+ schema: (0, graphql_tag_1.gql) `
210
+ extend type Mutation {
211
+ createStripePaymentIntent: String!
212
+ }
213
213
  `,
214
214
  resolvers: [stripe_resolver_1.StripeResolver],
215
215
  },
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "@vendure/payments-plugin",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "license": "GPL-3.0-or-later",
5
5
  "main": "package/index.js",
6
6
  "types": "package/index.d.ts",
7
7
  "files": [
8
8
  "package/**/*"
9
9
  ],
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/vendure-ecommerce/vendure"
13
+ },
10
14
  "private": false,
11
15
  "scripts": {
12
16
  "watch": "tsc -p ./tsconfig.build.json --watch",
@@ -46,9 +50,9 @@
46
50
  "@mollie/api-client": "^3.7.0",
47
51
  "@types/braintree": "^3.3.11",
48
52
  "@types/localtunnel": "2.0.4",
49
- "@vendure/common": "^3.2.0",
50
- "@vendure/core": "^3.2.0",
51
- "@vendure/testing": "^3.2.0",
53
+ "@vendure/common": "^3.2.1",
54
+ "@vendure/core": "^3.2.1",
55
+ "@vendure/testing": "^3.2.1",
52
56
  "braintree": "^3.22.0",
53
57
  "localtunnel": "2.0.2",
54
58
  "nock": "^13.1.4",
@@ -56,5 +60,5 @@
56
60
  "stripe": "^13.3.0",
57
61
  "typescript": "5.8.2"
58
62
  },
59
- "gitHead": "58c173ac0c7854ff53809d69f34a496f3eff1910"
63
+ "gitHead": "d86ca35d52e64990f5cb17dad476c6315a2e548c"
60
64
  }