@lightspeed/online-payments-sdk 1.4.1 → 1.4.2

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.
@@ -163,11 +163,13 @@ function createCustomTermsElement() {
163
163
  var stripeTermsLink = "<a href=\"".concat(terms_1.ACH_TERMS_URL.STRIPE_ACH_AUTHORIZATION, "\" target=\"_blank\" rel=\"noopener noreferrer\">").concat(terms_1.ACH_TERMS_TEXT.STRIPE_TERMS_LINK_TEXT, "</a>");
164
164
  var expandableToggle = "<span class=\"stripe-expandable-terms-toggle\" role=\"button\" tabindex=\"0\" aria-expanded=\"false\">".concat(terms_1.ACH_TERMS_TEXT.EXPANDABLE_TERMS_LINK_TEXT, " ").concat(CHEVRON_DOWN_SVG, "</span>");
165
165
  termsText.innerHTML = "".concat(terms_1.ACH_TERMS_TEXT.TERMS_PREFIX, " ").concat(stripeTermsLink, " ").concat(terms_1.ACH_TERMS_TEXT.TERMS_CONJUNCTION, " ").concat(expandableToggle);
166
- // Create expandable terms content
166
+ // Create expandable terms content from plain-text paragraphs
167
167
  var expandableContent = document.createElement('div');
168
168
  expandableContent.className = 'stripe-expandable-terms-content';
169
169
  expandableContent.style.display = 'none';
170
- expandableContent.innerHTML = "<p>".concat(terms_1.ACH_TERMS_TEXT.EXPANDED_TERMS_CONTENT, "</p>");
170
+ var paragraphs = terms_1.ACH_TERMS_TEXT.EXPANDED_TERMS_PARAGRAPHS.map(function (text) { return "<p>".concat(text, "</p>"); }).join('');
171
+ var privacyLink = "<a href=\"".concat(terms_1.ACH_TERMS_URL.PRIVACY_POLICY, "\" target=\"_blank\" rel=\"noopener noreferrer\">").concat(terms_1.ACH_TERMS_TEXT.PRIVACY_POLICY_LINK_TEXT, "</a>");
172
+ expandableContent.innerHTML = "".concat(paragraphs, "<p>").concat(terms_1.ACH_TERMS_TEXT.EXPANDED_TERMS_PRIVACY_PREFIX, " ").concat(privacyLink, ".</p>");
171
173
  termsContainer.appendChild(termsText);
172
174
  termsContainer.appendChild(expandableContent);
173
175
  // Add click handler for expandable toggle
@@ -20,10 +20,24 @@ exports.ACH_TERMS_TEXT = {
20
20
  EXPANDABLE_TERMS_LINK_TEXT: 'these terms',
21
21
  /**
22
22
  * Expanded terms content for ACH authorization.
23
- * This is the detailed legal text shown when user expands "these terms".
23
+ * Each entry is a separate paragraph rendered when the user expands
24
+ * "these terms". Kept as plain text — HTML structure is built in code.
24
25
  */
25
- EXPANDED_TERMS_CONTENT: 'By providing your bank account details and confirming this payment, you authorize the merchant to debit your account for the amount shown. If you choose to save your bank account for future payments, this authorization will also apply to any future amounts owed for products or services provided by the merchant, until you cancel it. You also authorize the merchant to credit your account as necessary to correct any erroneous debits. You may revoke authorization at any time by contacting the merchant, allowing up to thirty (30) days for processing. You confirm that you are an authorized signer on the account and that sufficient funds will be available for each payment. ACH payments may take up to five (5) business days to complete, and you may be responsible for fees if a payment is returned.',
26
+ EXPANDED_TERMS_PARAGRAPHS: [
27
+ 'By providing your bank account details and confirming this payment, you authorize the merchant to debit your account for the amount shown.',
28
+ 'If you choose to save your bank account for future payments, this authorization will also apply to any amounts now or hereafter due and payable, including amounts previously invoiced, accrued, outstanding, or otherwise payable, in addition to current, and future payment obligations owed for products or services provided by the merchant, until you cancel it.',
29
+ 'You also authorize the merchant to credit your account as necessary to correct any erroneous debits.',
30
+ 'You may revoke authorization at any time by contacting the merchant, allowing up to thirty (30) days for processing.\nYou confirm that you are an authorized signer on the account and that sufficient funds will be available for each payment.\nACH payments may take up to five (5) business days to complete, and you may be responsible for fees if a payment is returned.',
31
+ ],
32
+ /**
33
+ * Final paragraph containing a link to the Privacy Policy.
34
+ * The link text and URL are defined separately so translators only
35
+ * localize the surrounding copy, not the URL.
36
+ */
37
+ EXPANDED_TERMS_PRIVACY_PREFIX: 'Lightspeed may collect or access certain payment-related information as described in the platform agreement and',
38
+ PRIVACY_POLICY_LINK_TEXT: 'Privacy Policy',
26
39
  };
27
40
  exports.ACH_TERMS_URL = {
28
41
  STRIPE_ACH_AUTHORIZATION: 'https://stripe.com/legal/ach-payments/authorization',
42
+ PRIVACY_POLICY: 'https://www.lightspeedhq.com/legal/privacy-policy/',
29
43
  };
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
4
  // This file is auto-generated during the build process
5
5
  // DO NOT EDIT MANUALLY - Version is extracted from package.json
6
- exports.SDK_VERSION = '1.4.1';
6
+ exports.SDK_VERSION = '1.4.2';
@@ -151,11 +151,13 @@ function createCustomTermsElement() {
151
151
  var stripeTermsLink = "<a href=\"".concat(ACH_TERMS_URL.STRIPE_ACH_AUTHORIZATION, "\" target=\"_blank\" rel=\"noopener noreferrer\">").concat(ACH_TERMS_TEXT.STRIPE_TERMS_LINK_TEXT, "</a>");
152
152
  var expandableToggle = "<span class=\"stripe-expandable-terms-toggle\" role=\"button\" tabindex=\"0\" aria-expanded=\"false\">".concat(ACH_TERMS_TEXT.EXPANDABLE_TERMS_LINK_TEXT, " ").concat(CHEVRON_DOWN_SVG, "</span>");
153
153
  termsText.innerHTML = "".concat(ACH_TERMS_TEXT.TERMS_PREFIX, " ").concat(stripeTermsLink, " ").concat(ACH_TERMS_TEXT.TERMS_CONJUNCTION, " ").concat(expandableToggle);
154
- // Create expandable terms content
154
+ // Create expandable terms content from plain-text paragraphs
155
155
  var expandableContent = document.createElement('div');
156
156
  expandableContent.className = 'stripe-expandable-terms-content';
157
157
  expandableContent.style.display = 'none';
158
- expandableContent.innerHTML = "<p>".concat(ACH_TERMS_TEXT.EXPANDED_TERMS_CONTENT, "</p>");
158
+ var paragraphs = ACH_TERMS_TEXT.EXPANDED_TERMS_PARAGRAPHS.map(function (text) { return "<p>".concat(text, "</p>"); }).join('');
159
+ var privacyLink = "<a href=\"".concat(ACH_TERMS_URL.PRIVACY_POLICY, "\" target=\"_blank\" rel=\"noopener noreferrer\">").concat(ACH_TERMS_TEXT.PRIVACY_POLICY_LINK_TEXT, "</a>");
160
+ expandableContent.innerHTML = "".concat(paragraphs, "<p>").concat(ACH_TERMS_TEXT.EXPANDED_TERMS_PRIVACY_PREFIX, " ").concat(privacyLink, ".</p>");
159
161
  termsContainer.appendChild(termsText);
160
162
  termsContainer.appendChild(expandableContent);
161
163
  // Add click handler for expandable toggle
@@ -17,10 +17,19 @@ export declare const ACH_TERMS_TEXT: {
17
17
  readonly EXPANDABLE_TERMS_LINK_TEXT: "these terms";
18
18
  /**
19
19
  * Expanded terms content for ACH authorization.
20
- * This is the detailed legal text shown when user expands "these terms".
20
+ * Each entry is a separate paragraph rendered when the user expands
21
+ * "these terms". Kept as plain text — HTML structure is built in code.
21
22
  */
22
- readonly EXPANDED_TERMS_CONTENT: "By providing your bank account details and confirming this payment, you authorize the merchant to debit your account for the amount shown. If you choose to save your bank account for future payments, this authorization will also apply to any future amounts owed for products or services provided by the merchant, until you cancel it. You also authorize the merchant to credit your account as necessary to correct any erroneous debits. You may revoke authorization at any time by contacting the merchant, allowing up to thirty (30) days for processing. You confirm that you are an authorized signer on the account and that sufficient funds will be available for each payment. ACH payments may take up to five (5) business days to complete, and you may be responsible for fees if a payment is returned.";
23
+ readonly EXPANDED_TERMS_PARAGRAPHS: readonly ["By providing your bank account details and confirming this payment, you authorize the merchant to debit your account for the amount shown.", "If you choose to save your bank account for future payments, this authorization will also apply to any amounts now or hereafter due and payable, including amounts previously invoiced, accrued, outstanding, or otherwise payable, in addition to current, and future payment obligations owed for products or services provided by the merchant, until you cancel it.", "You also authorize the merchant to credit your account as necessary to correct any erroneous debits.", "You may revoke authorization at any time by contacting the merchant, allowing up to thirty (30) days for processing.\nYou confirm that you are an authorized signer on the account and that sufficient funds will be available for each payment.\nACH payments may take up to five (5) business days to complete, and you may be responsible for fees if a payment is returned."];
24
+ /**
25
+ * Final paragraph containing a link to the Privacy Policy.
26
+ * The link text and URL are defined separately so translators only
27
+ * localize the surrounding copy, not the URL.
28
+ */
29
+ readonly EXPANDED_TERMS_PRIVACY_PREFIX: "Lightspeed may collect or access certain payment-related information as described in the platform agreement and";
30
+ readonly PRIVACY_POLICY_LINK_TEXT: "Privacy Policy";
23
31
  };
24
32
  export declare const ACH_TERMS_URL: {
25
33
  readonly STRIPE_ACH_AUTHORIZATION: "https://stripe.com/legal/ach-payments/authorization";
34
+ readonly PRIVACY_POLICY: "https://www.lightspeedhq.com/legal/privacy-policy/";
26
35
  };
@@ -17,10 +17,24 @@ export var ACH_TERMS_TEXT = {
17
17
  EXPANDABLE_TERMS_LINK_TEXT: 'these terms',
18
18
  /**
19
19
  * Expanded terms content for ACH authorization.
20
- * This is the detailed legal text shown when user expands "these terms".
20
+ * Each entry is a separate paragraph rendered when the user expands
21
+ * "these terms". Kept as plain text — HTML structure is built in code.
21
22
  */
22
- EXPANDED_TERMS_CONTENT: 'By providing your bank account details and confirming this payment, you authorize the merchant to debit your account for the amount shown. If you choose to save your bank account for future payments, this authorization will also apply to any future amounts owed for products or services provided by the merchant, until you cancel it. You also authorize the merchant to credit your account as necessary to correct any erroneous debits. You may revoke authorization at any time by contacting the merchant, allowing up to thirty (30) days for processing. You confirm that you are an authorized signer on the account and that sufficient funds will be available for each payment. ACH payments may take up to five (5) business days to complete, and you may be responsible for fees if a payment is returned.',
23
+ EXPANDED_TERMS_PARAGRAPHS: [
24
+ 'By providing your bank account details and confirming this payment, you authorize the merchant to debit your account for the amount shown.',
25
+ 'If you choose to save your bank account for future payments, this authorization will also apply to any amounts now or hereafter due and payable, including amounts previously invoiced, accrued, outstanding, or otherwise payable, in addition to current, and future payment obligations owed for products or services provided by the merchant, until you cancel it.',
26
+ 'You also authorize the merchant to credit your account as necessary to correct any erroneous debits.',
27
+ 'You may revoke authorization at any time by contacting the merchant, allowing up to thirty (30) days for processing.\nYou confirm that you are an authorized signer on the account and that sufficient funds will be available for each payment.\nACH payments may take up to five (5) business days to complete, and you may be responsible for fees if a payment is returned.',
28
+ ],
29
+ /**
30
+ * Final paragraph containing a link to the Privacy Policy.
31
+ * The link text and URL are defined separately so translators only
32
+ * localize the surrounding copy, not the URL.
33
+ */
34
+ EXPANDED_TERMS_PRIVACY_PREFIX: 'Lightspeed may collect or access certain payment-related information as described in the platform agreement and',
35
+ PRIVACY_POLICY_LINK_TEXT: 'Privacy Policy',
23
36
  };
24
37
  export var ACH_TERMS_URL = {
25
38
  STRIPE_ACH_AUTHORIZATION: 'https://stripe.com/legal/ach-payments/authorization',
39
+ PRIVACY_POLICY: 'https://www.lightspeedhq.com/legal/privacy-policy/',
26
40
  };
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.4.1";
1
+ export declare const SDK_VERSION = "1.4.2";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file is auto-generated during the build process
2
2
  // DO NOT EDIT MANUALLY - Version is extracted from package.json
3
- export var SDK_VERSION = '1.4.1';
3
+ export var SDK_VERSION = '1.4.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightspeed/online-payments-sdk",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Process online-payments with Lightspeed Payments",
5
5
  "author": "Lightspeed Commerce Inc.",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -19,7 +19,8 @@
19
19
  color: #30313d;
20
20
  }
21
21
 
22
- .stripe-custom-terms-text a {
22
+ .stripe-custom-terms-text a,
23
+ .stripe-expandable-terms-content a {
23
24
  color: #635bff;
24
25
  text-decoration: underline;
25
26
  }
@@ -78,6 +79,7 @@
78
79
  }
79
80
 
80
81
  .lsp-theme-invoicing .stripe-custom-terms-text a,
81
- .lsp-theme-invoicing .stripe-expandable-terms-toggle {
82
+ .lsp-theme-invoicing .stripe-expandable-terms-toggle,
83
+ .lsp-theme-invoicing .stripe-expandable-terms-content a {
82
84
  color: var(--accent-9, #635bff);
83
85
  }