@strabl-engineering/strabl-pay 1.0.1 → 1.0.3
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/dist/components/strabl-card-form.element.d.ts +1 -0
- package/dist/constants/constants.d.ts +4 -0
- package/dist/index.js +2 -2
- package/dist/index.umd.cjs +1 -1
- package/dist/lib/Validations.d.ts +2 -0
- package/dist/network/PaymentService.d.ts +4 -1
- package/dist/react.js +1 -1
- package/dist/react.umd.cjs +1 -1
- package/dist/{strabl-input.element-D4eKPBeY.cjs → strabl-input.element-D3e1g1EM.cjs} +41 -41
- package/dist/{strabl-input.element-C8v5etbM.js → strabl-input.element-D7h9lUA5.js} +2343 -2293
- package/package.json +77 -77
|
@@ -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-
|
|
2
|
-
import { c as l, i as s } from "./strabl-input.element-
|
|
1
|
+
import { S as a, a as o } from "./strabl-input.element-D7h9lUA5.js";
|
|
2
|
+
import { c as l, i as s } from "./strabl-input.element-D7h9lUA5.js";
|
|
3
3
|
function c(t) {
|
|
4
4
|
if (typeof document > "u")
|
|
5
5
|
throw new Error(
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./strabl-input.element-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./strabl-input.element-D3e1g1EM.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;
|
|
@@ -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 = {
|
|
@@ -64,8 +66,9 @@ export declare class PaymentService {
|
|
|
64
66
|
[key: string]: string;
|
|
65
67
|
};
|
|
66
68
|
}): Promise<CreatePaymentIntentResponse>;
|
|
67
|
-
confirmPayment({ transactionId, }: {
|
|
69
|
+
confirmPayment({ transactionId, meta }: {
|
|
68
70
|
transactionId: string;
|
|
71
|
+
meta: object;
|
|
69
72
|
}): Promise<ConfirmPaymentResponse>;
|
|
70
73
|
createApplePaySession({ validationUrl, }: {
|
|
71
74
|
validationUrl: string;
|
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-
|
|
2
|
+
import { S as u, a as c } from "./strabl-input.element-D7h9lUA5.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) {
|
package/dist/react.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),c=require("./strabl-input.element-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),c=require("./strabl-input.element-D3e1g1EM.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;
|