@htmlbricks/hb-payment-paypal 0.66.7 → 0.66.9

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 ADDED
@@ -0,0 +1,35 @@
1
+ ## `hb-payment-paypal` — payment PayPal
2
+
3
+ **Category:** commerce
4
+ **Tags:** commerce, payment
5
+
6
+ ### What it does
7
+
8
+ Loads the PayPal JS SDK with your client id and currency, renders PayPal Buttons for a fixed order total, captures payment on approval, and dispatches `paymentCompleted` when the order is captured successfully.
9
+
10
+ ### Custom element
11
+
12
+ `hb-payment-paypal`
13
+
14
+ ### Attributes (snake_case; use string values in HTML)
15
+
16
+ - `id`, `style` (optional): strings.
17
+ - `paypalid` (required): string — PayPal client / app id.
18
+ - `currency` (required): `"EUR"` | `"USD"` (string).
19
+ - `total` (required): number as string — order amount.
20
+
21
+ ### Events
22
+
23
+ - `paymentCompleted`: `{ method: "paypal"; total: number }`.
24
+
25
+ ### Usage notes
26
+
27
+ - **CSS variables:** `--hb-checkout-border`.
28
+ - **CSS parts:** `btn` (PayPal button surface).
29
+ - Ensure CSP and PayPal script loading match your host app; totals are fixed for the rendered session.
30
+
31
+ ### Minimal HTML example
32
+
33
+ ```html
34
+ <hb-payment-paypal paypalid="YOUR_CLIENT_ID" currency="EUR" total="40"></hb-payment-paypal>
35
+ ```
package/manifest.json CHANGED
@@ -133,5 +133,5 @@
133
133
  "size": {},
134
134
  "iifePath": "main.iife.js",
135
135
  "repoName": "@htmlbricks/hb-payment-paypal",
136
- "version": "0.66.7"
136
+ "version": "0.66.9"
137
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-payment-paypal",
3
- "version": "0.66.7",
3
+ "version": "0.66.9",
4
4
  "contributors": [],
5
5
  "description": "Loads the PayPal JS SDK with your client id and currency, renders PayPal Buttons for a fixed order total, captures payment on approval, and dispatches paymentCompleted when the order is captured successfully.",
6
6
  "licenses": [