@storecraft/payments-paypal 1.0.0 → 1.0.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/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Paypal payment gateway for **StoreCraft**
2
2
 
3
- [paypal standard](https://developer.paypal.com/docs/checkout/standard/) integration
3
+ <div style="text-align:center">
4
+ <img src='https://storecraft.app/storecraft-color.svg'
5
+ width='90%'' />
6
+ </div><hr/><br/>
7
+
8
+ [paypal](https://developer.paypal.com/docs/checkout/) integration
4
9
 
5
10
  ## Features
6
11
  - Create checkouts with `AUTHORIZE` or `CAPTURE` intents
@@ -9,12 +14,14 @@
9
14
  - Supports both `prod` and `test` endpoints
10
15
 
11
16
  ```bash
12
- npm i @storecraft/payments-paypal-standard
17
+ npm i @storecraft/payments-paypal
13
18
  ```
14
19
 
15
20
  ## Howto
16
21
 
17
22
  ```js
23
+ import { PayPal } from '@storecraft/payments-paypal';
24
+
18
25
  const config = {
19
26
  env: 'prod',
20
27
  client_id: '<get-from-your-paypal-dashboard>',
@@ -23,20 +30,20 @@ const config = {
23
30
  intent_on_checkout: 'AUTHORIZE'
24
31
  }
25
32
 
26
- new PaypalStandard(config);
33
+ new Paypal(config);
27
34
  ```
28
35
 
29
36
  ## Developer info and test
30
37
 
31
38
  Integration examples
32
- - https://developer.paypal.com/studio/checkout/standard/integrate
39
+ - https://developer.paypal.com/
33
40
 
34
41
  Credit Card Generator
35
42
  - https://developer.paypal.com/tools/sandbox/card-testing/#link-creditcardgenerator
36
43
 
37
44
  ## todo:
38
45
  - Add tests
39
- - Think about adding more dynamic config
46
+ - Add webhook support
40
47
 
41
48
  ```text
42
49
  Author: Tomer Shalev (tomer.shalev@gmail.com)
package/adapter.html.js CHANGED
@@ -10,7 +10,7 @@
10
10
  * - Expiry date: 12/2027
11
11
  * - CVC code: 897
12
12
  *
13
- * @param {import("./types.public.js").Config} config
13
+ * @param {import("./types.public.d.ts").Config} config
14
14
  * @param {Partial<import("@storecraft/core/v-api").OrderData>} order_data
15
15
  */
16
16
  export default function html_buy_ui(config, order_data) {
package/adapter.js CHANGED
@@ -8,7 +8,7 @@ import html_buy_ui from './adapter.html.js';
8
8
  * @typedef {import('@storecraft/core/v-api').PaymentGatewayStatus} PaymentGatewayStatus
9
9
  * @typedef {import('@storecraft/core/v-api').CheckoutStatusEnum} CheckoutStatusOptions
10
10
  * @typedef {import('@storecraft/core/v-api').OrderData} OrderData
11
- * @typedef {import('./types.public.js').Config} Config
11
+ * @typedef {import('./types.public.d.ts').Config} Config
12
12
  * @typedef {import('@storecraft/core/v-payments').payment_gateway<Config, CreateResult>} payment_gateway
13
13
  */
14
14
 
package/adapter.utils.js CHANGED
@@ -5,7 +5,7 @@ export const endpoints = {
5
5
  }
6
6
 
7
7
  /**
8
- * @typedef {import("./types.public.js").Config} Config
8
+ * @typedef {import("./types.public.d.ts").Config} Config
9
9
  */
10
10
 
11
11
  /**
@@ -1,11 +1,6 @@
1
1
  {
2
- "compileOnSave": false,
3
2
  "compilerOptions": {
4
- "noEmit": true,
5
- "allowJs": true,
6
3
  "checkJs": true,
7
- "target": "ESNext",
8
- "resolveJsonModule": true,
9
4
  "moduleResolution": "NodeNext",
10
5
  "module": "NodeNext",
11
6
  "composite": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storecraft/payments-paypal",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Official Paypal integration with Storecraft",
5
5
  "license": "MIT",
6
6
  "author": "Tomer Shalev (https://github.com/store-craft)",
@@ -17,8 +17,8 @@
17
17
  "storecraft"
18
18
  ],
19
19
  "type": "module",
20
- "main": "index.js",
21
- "types": "./types.public.d.ts",
20
+ "main": "adapter.js",
21
+ "types": "types.public.d.ts",
22
22
  "scripts": {
23
23
  "payments-paypal:test": "uvu -c",
24
24
  "payments-paypal:publish": "npm publish --access public"
package/types.public.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './index.js';
1
+ export { Paypal } from './adapter.js';
2
2
 
3
3
  /**
4
4
  * @description gateway config
package/index.js DELETED
@@ -1 +0,0 @@
1
- export * from './adapter.js'