@delopay/sdk 0.128.0 → 0.130.0
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/{chunk-PKPIWKB2.js → chunk-HMYRBVUT.js} +41 -1
- package/dist/{chunk-PKPIWKB2.js.map → chunk-HMYRBVUT.js.map} +1 -1
- package/dist/index.cjs +41 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -1
- package/dist/index.d.ts +87 -1
- package/dist/index.js +3 -1
- package/dist/internal.cjs +41 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +3 -1
- package/dist/internal.js.map +1 -1
- package/package.json +18 -17
|
@@ -5242,6 +5242,7 @@ var SURCHARGE_POSITIONS = [
|
|
|
5242
5242
|
"cornerStart",
|
|
5243
5243
|
"cornerEnd"
|
|
5244
5244
|
];
|
|
5245
|
+
var NATIVE_ELEMENT_POSITIONS = ["top", "bottom"];
|
|
5245
5246
|
var SURCHARGE_STYLES = [
|
|
5246
5247
|
"plain",
|
|
5247
5248
|
"underline",
|
|
@@ -5654,6 +5655,9 @@ var DEFAULT_BRANDING_BASE = {
|
|
|
5654
5655
|
// find out about on the statement.
|
|
5655
5656
|
showSurcharge: true,
|
|
5656
5657
|
surchargePosition: "trailing",
|
|
5658
|
+
// The button is the surface a buyer recognises fastest; it leads its section
|
|
5659
|
+
// unless the merchant says otherwise.
|
|
5660
|
+
nativeElementPosition: "top",
|
|
5657
5661
|
surchargeStyle: "badge",
|
|
5658
5662
|
surchargeSize: "sm",
|
|
5659
5663
|
surchargeShape: "pill",
|
|
@@ -6294,6 +6298,11 @@ function decodeBranding(source) {
|
|
|
6294
6298
|
SURCHARGE_POSITIONS,
|
|
6295
6299
|
DEFAULT_BRANDING.surchargePosition
|
|
6296
6300
|
),
|
|
6301
|
+
nativeElementPosition: pickEnum(
|
|
6302
|
+
extras["nativeElementPosition"],
|
|
6303
|
+
NATIVE_ELEMENT_POSITIONS,
|
|
6304
|
+
DEFAULT_BRANDING.nativeElementPosition
|
|
6305
|
+
),
|
|
6297
6306
|
surchargeStyle: pickEnum(
|
|
6298
6307
|
extras["surchargeStyle"],
|
|
6299
6308
|
SURCHARGE_STYLES,
|
|
@@ -6413,6 +6422,7 @@ function encodeBranding(branding, base) {
|
|
|
6413
6422
|
buttonSize: branding.buttonSize,
|
|
6414
6423
|
showSurcharge: String(branding.showSurcharge),
|
|
6415
6424
|
surchargePosition: branding.surchargePosition,
|
|
6425
|
+
nativeElementPosition: branding.nativeElementPosition,
|
|
6416
6426
|
surchargeStyle: branding.surchargeStyle,
|
|
6417
6427
|
surchargeSize: branding.surchargeSize,
|
|
6418
6428
|
surchargeShape: branding.surchargeShape,
|
|
@@ -6571,6 +6581,11 @@ function parseImportedBranding(raw) {
|
|
|
6571
6581
|
SURCHARGE_POSITIONS,
|
|
6572
6582
|
dflt.surchargePosition
|
|
6573
6583
|
),
|
|
6584
|
+
nativeElementPosition: pickEnum(
|
|
6585
|
+
root["nativeElementPosition"],
|
|
6586
|
+
NATIVE_ELEMENT_POSITIONS,
|
|
6587
|
+
dflt.nativeElementPosition
|
|
6588
|
+
),
|
|
6574
6589
|
surchargeStyle: pickEnum(
|
|
6575
6590
|
root["surchargeStyle"],
|
|
6576
6591
|
SURCHARGE_STYLES,
|
|
@@ -7033,6 +7048,30 @@ var CheckoutSession = class {
|
|
|
7033
7048
|
headers: this.pkHeaders(options?.headers)
|
|
7034
7049
|
});
|
|
7035
7050
|
}
|
|
7051
|
+
/**
|
|
7052
|
+
* Mint the processor-side session a browser SDK completes — the PayPal
|
|
7053
|
+
* order that PayPal's buttons or Card Fields attach the buyer's choice to.
|
|
7054
|
+
* The client secret is attached automatically.
|
|
7055
|
+
*
|
|
7056
|
+
* For PayPal Card Fields (be#1387) pass `payment_method: 'card'` and the
|
|
7057
|
+
* `merchant_connector_id` the checkout was rendered with; the order id comes
|
|
7058
|
+
* back in `next_action.next_action_data.order_id` and is what the SDK's
|
|
7059
|
+
* `createOrder` returns. The confirm that captures it sends the same order
|
|
7060
|
+
* and account as `payment_method_data.card_reference`.
|
|
7061
|
+
*
|
|
7062
|
+
* `POST /payments/{paymentId}/post-session-tokens` (publishable key)
|
|
7063
|
+
*/
|
|
7064
|
+
async postSessionTokens(params, options) {
|
|
7065
|
+
return this.client.request(
|
|
7066
|
+
"POST",
|
|
7067
|
+
`/payments/${encodeURIComponent(this.paymentId)}/post-session-tokens`,
|
|
7068
|
+
{
|
|
7069
|
+
body: { ...params, client_secret: this.requireClientSecret() },
|
|
7070
|
+
...options,
|
|
7071
|
+
headers: this.pkHeaders(options?.headers)
|
|
7072
|
+
}
|
|
7073
|
+
);
|
|
7074
|
+
}
|
|
7036
7075
|
/**
|
|
7037
7076
|
* Abandon the attempt the buyer left open on a connector's hosted page
|
|
7038
7077
|
* (the payment sits in `requires_customer_action`) and open a fresh attempt
|
|
@@ -7481,6 +7520,7 @@ export {
|
|
|
7481
7520
|
surchargeFigurePlan,
|
|
7482
7521
|
readableInkOn,
|
|
7483
7522
|
SURCHARGE_POSITIONS,
|
|
7523
|
+
NATIVE_ELEMENT_POSITIONS,
|
|
7484
7524
|
SURCHARGE_STYLES,
|
|
7485
7525
|
SURCHARGE_BORDER_WIDTHS,
|
|
7486
7526
|
SURCHARGE_BORDER_STYLES,
|
|
@@ -7601,4 +7641,4 @@ export {
|
|
|
7601
7641
|
decodeNativePanes,
|
|
7602
7642
|
encodeNativePanes
|
|
7603
7643
|
};
|
|
7604
|
-
//# sourceMappingURL=chunk-
|
|
7644
|
+
//# sourceMappingURL=chunk-HMYRBVUT.js.map
|