@strabl-engineering/strabl-pay 1.0.0 → 1.0.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.
package/README.md CHANGED
@@ -3,7 +3,9 @@
3
3
  STRABL Pay SDK is the fastest way to embed secure, lightweight & PCI-DSS compliant card payments inside any website — providing a unified interface across modern web frameworks while keeping the payment experience smooth and seamless
4
4
 
5
5
  For developers — Lightweight, framework-agnostic, and PCI-DSS compliant out of the box. Integrate in minutes, not days
6
+
6
7
  For UI/UX designers — Every element is fully customizable. Match your checkout to your brand without any friction
8
+
7
9
  For merchants & businesses — A unified, reliable payment experience that builds customer trust from the first transaction
8
10
 
9
11
  ## **Supported Frameworks:**
@@ -75,6 +75,7 @@ export declare class StrablCardForm extends LitElement {
75
75
  validateCardHolderName(): boolean;
76
76
  handleSubmit(e?: Event): Promise<void>;
77
77
  private handleThreeDsAuthCompletion;
78
+ private handleStrablThreeDsAuthCompletionRedirect;
78
79
  private removeUrlParam;
79
80
  private checkForThreeDsAuthRedirect;
80
81
  private notifySuccess;
@@ -2,6 +2,10 @@ export declare const BASE_API_URL: {
2
2
  sandbox: string;
3
3
  prod: string;
4
4
  };
5
+ export declare const CHECKOUT_URL: {
6
+ sandbox: string;
7
+ prod: string;
8
+ };
5
9
  export declare const GENERATE_CARD_TOKEN_API = "/v1/api/direct/tokenize";
6
10
  export declare const INTENTION_TO_PAY_API = "/v1/api/direct/intent-to-pay";
7
11
  export declare const CONFIRM_PAYMENT_API = "/v1/api/direct/pay";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { S as a, a as o } from "./strabl-input.element-DeXtiSuj.js";
2
- import { c as l, i as s } from "./strabl-input.element-DeXtiSuj.js";
1
+ import { S as a, a as o } from "./strabl-input.element-DG84epQi.js";
2
+ import { c as l, i as s } from "./strabl-input.element-DG84epQi.js";
3
3
  function c(t) {
4
4
  if (typeof document > "u")
5
5
  throw new Error(
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./strabl-input.element-CbrtvlUF.cjs");function m(r){if(typeof document>"u")throw new Error("mountCardForm can only be called in a browser environment");customElements.get("strabl-card-form")||customElements.define("strabl-card-form",n.StrablCardForm);const o=document.querySelector(r.selector);if(!o)throw new Error(`mountCardForm: no element matched selector "${r.selector}"`);const t=document.createElement("strabl-card-form"),a=e=>{e.platformUuid!==void 0&&(t.platformUuid=e.platformUuid),e.apiKey!==void 0&&(t.apiKey=e.apiKey),e.currencyCode!==void 0&&(t.currencyCode=e.currencyCode),e.amount!==void 0&&(t.amount=e.amount),e.language!==void 0&&(t.language=e.language),e.paymentMethods!==void 0&&(t.paymentMethods=e.paymentMethods),e.customstyles!==void 0&&(t.customstyles=e.customstyles),e.customer!==void 0&&(t.customer=e.customer),e.onPaymentSubmission!==void 0&&(t.onPaymentSubmission=e.onPaymentSubmission),e.onPaymentSuccess!==void 0&&(t.onPaymentSuccess=e.onPaymentSuccess),e.onPaymentFailed!==void 0&&(t.onPaymentFailed=e.onPaymentFailed)};return a(r),r.replace?o.replaceChildren(t):o.appendChild(t),{element:t,update:e=>a(e),submit:()=>{window.dispatchEvent(new CustomEvent("strabl-submit-card-form"))},destroy:()=>t.remove()}}typeof customElements<"u"&&(customElements.get("strabl-card-form")||customElements.define("strabl-card-form",n.StrablCardForm),customElements.get("strabl-input")||customElements.define("strabl-input",n.StrablInput));Object.defineProperty(exports,"StrablCardForm",{enumerable:!0,get:()=>n.StrablCardForm});Object.defineProperty(exports,"StrablInput",{enumerable:!0,get:()=>n.StrablInput});exports.configureFonts=n.configureFonts;exports.injectGlobalFonts=n.injectGlobalFonts;exports.mountCardForm=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./strabl-input.element-CkJFJ0Zt.cjs");function m(r){if(typeof document>"u")throw new Error("mountCardForm can only be called in a browser environment");customElements.get("strabl-card-form")||customElements.define("strabl-card-form",n.StrablCardForm);const o=document.querySelector(r.selector);if(!o)throw new Error(`mountCardForm: no element matched selector "${r.selector}"`);const t=document.createElement("strabl-card-form"),a=e=>{e.platformUuid!==void 0&&(t.platformUuid=e.platformUuid),e.apiKey!==void 0&&(t.apiKey=e.apiKey),e.currencyCode!==void 0&&(t.currencyCode=e.currencyCode),e.amount!==void 0&&(t.amount=e.amount),e.language!==void 0&&(t.language=e.language),e.paymentMethods!==void 0&&(t.paymentMethods=e.paymentMethods),e.customstyles!==void 0&&(t.customstyles=e.customstyles),e.customer!==void 0&&(t.customer=e.customer),e.onPaymentSubmission!==void 0&&(t.onPaymentSubmission=e.onPaymentSubmission),e.onPaymentSuccess!==void 0&&(t.onPaymentSuccess=e.onPaymentSuccess),e.onPaymentFailed!==void 0&&(t.onPaymentFailed=e.onPaymentFailed)};return a(r),r.replace?o.replaceChildren(t):o.appendChild(t),{element:t,update:e=>a(e),submit:()=>{window.dispatchEvent(new CustomEvent("strabl-submit-card-form"))},destroy:()=>t.remove()}}typeof customElements<"u"&&(customElements.get("strabl-card-form")||customElements.define("strabl-card-form",n.StrablCardForm),customElements.get("strabl-input")||customElements.define("strabl-input",n.StrablInput));Object.defineProperty(exports,"StrablCardForm",{enumerable:!0,get:()=>n.StrablCardForm});Object.defineProperty(exports,"StrablInput",{enumerable:!0,get:()=>n.StrablInput});exports.configureFonts=n.configureFonts;exports.injectGlobalFonts=n.injectGlobalFonts;exports.mountCardForm=m;
@@ -1 +1,3 @@
1
1
  export declare const isValidUrl: (str: string) => boolean;
2
+ export declare const containsHtml: (str: string) => boolean;
3
+ export declare const isProd: (apiKey: string) => boolean;
@@ -29,6 +29,8 @@ type CreatePaymentIntentResponse = {
29
29
  "3dsToken"?: string;
30
30
  "3dsUrl"?: string;
31
31
  };
32
+ transactionId?: string;
33
+ redirectId?: string;
32
34
  };
33
35
  };
34
36
  type ConfirmPaymentResponse = {
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as s from "react";
2
- import { S as u, a as c } from "./strabl-input.element-DeXtiSuj.js";
2
+ import { S as u, a as c } from "./strabl-input.element-DG84epQi.js";
3
3
  typeof customElements < "u" && !customElements.get("strabl-card-form") && customElements.define("strabl-card-form", u);
4
4
  typeof customElements < "u" && !customElements.get("strabl-input") && customElements.define("strabl-input", c);
5
5
  const f = s.forwardRef(function(m, n) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),c=require("./strabl-input.element-CbrtvlUF.cjs");function i(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:()=>o[n]})}}return r.default=o,Object.freeze(r)}const a=i(m);typeof customElements<"u"&&!customElements.get("strabl-card-form")&&customElements.define("strabl-card-form",c.StrablCardForm);typeof customElements<"u"&&!customElements.get("strabl-input")&&customElements.define("strabl-input",c.StrablInput);const f=a.forwardRef(function(r,n){const{className:s,style:l,...e}=r,u=a.useRef(null);return a.useLayoutEffect(()=>{const t=u.current;t&&(t.paymentMethods=e.paymentMethods??["card"],t.customstyles=e.customstyles??{},t.customer=e.customer??{},t.onPaymentSubmission=e.onPaymentSubmission,t.onPaymentSuccess=e.onPaymentSuccess,t.onPaymentFailed=e.onPaymentFailed)},[e]),a.createElement("strabl-card-form",{ref:t=>{u.current=t,typeof n=="function"?n(t):n&&(n.current=t)},class:s,style:l,platformUuid:e.platformUuid,apiKey:e.apiKey,currencyCode:e.currencyCode,amount:e.amount,language:e.language||"en",fieldInputStyle:e.fieldInputStyle||"outlined"})});exports.StrablCardPaymentForm=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),c=require("./strabl-input.element-CkJFJ0Zt.cjs");function i(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:()=>o[n]})}}return r.default=o,Object.freeze(r)}const a=i(m);typeof customElements<"u"&&!customElements.get("strabl-card-form")&&customElements.define("strabl-card-form",c.StrablCardForm);typeof customElements<"u"&&!customElements.get("strabl-input")&&customElements.define("strabl-input",c.StrablInput);const f=a.forwardRef(function(r,n){const{className:s,style:l,...e}=r,u=a.useRef(null);return a.useLayoutEffect(()=>{const t=u.current;t&&(t.paymentMethods=e.paymentMethods??["card"],t.customstyles=e.customstyles??{},t.customer=e.customer??{},t.onPaymentSubmission=e.onPaymentSubmission,t.onPaymentSuccess=e.onPaymentSuccess,t.onPaymentFailed=e.onPaymentFailed)},[e]),a.createElement("strabl-card-form",{ref:t=>{u.current=t,typeof n=="function"?n(t):n&&(n.current=t)},class:s,style:l,platformUuid:e.platformUuid,apiKey:e.apiKey,currencyCode:e.currencyCode,amount:e.amount,language:e.language||"en",fieldInputStyle:e.fieldInputStyle||"outlined"})});exports.StrablCardPaymentForm=f;