@proxy-checkout/server-js 0.0.6-prx-101.60.1 → 0.0.6-prx-101.62.1

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.
@@ -73,9 +73,6 @@ class ProxySessionsResource {
73
73
  throw new Error("Proxy Checkout sessions.createHandoff requires a publishableKey option or input field.");
74
74
  }
75
75
  const payHost = input.payHost ?? this.options.payHost;
76
- if (!payHost && this.httpClient.apiHost !== "https://api.proxycheckout.com") {
77
- throw new Error("Proxy Checkout sessions.createHandoff requires a payHost option or input field when apiHost is overridden.");
78
- }
79
76
  const response = await this.httpClient.request("POST", "/proxy_sessions/handoff", {
80
77
  ...toCreateProxySessionBody(input),
81
78
  ...(input.payerDestinationUrl !== undefined
@@ -87,6 +84,11 @@ class ProxySessionsResource {
87
84
  requestId: input.requestId,
88
85
  });
89
86
  const session = toProxySessionHandoff(response);
87
+ if (!session.handoffUrl &&
88
+ !payHost &&
89
+ this.httpClient.apiHost !== "https://api.proxycheckout.com") {
90
+ throw new Error("Proxy Checkout sessions.createHandoff requires a payHost option or input field when apiHost is overridden and the API response does not include handoff_url.");
91
+ }
90
92
  return {
91
93
  ...session,
92
94
  handoffUrl: session.handoffUrl ||
@@ -1,3 +1,3 @@
1
1
  export declare const proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
2
- export declare const proxyCheckoutServerSdkVersion = "0.0.6-prx-101.60.1";
3
- export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.6-prx-101.60.1";
2
+ export declare const proxyCheckoutServerSdkVersion = "0.0.6-prx-101.62.1";
3
+ export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.6-prx-101.62.1";
@@ -1,3 +1,3 @@
1
1
  export declare const proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
2
- export declare const proxyCheckoutServerSdkVersion = "0.0.6-prx-101.60.1";
3
- export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.6-prx-101.60.1";
2
+ export declare const proxyCheckoutServerSdkVersion = "0.0.6-prx-101.62.1";
3
+ export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.6-prx-101.62.1";
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.proxyCheckoutServerSdkUserAgent = exports.proxyCheckoutServerSdkVersion = exports.proxyCheckoutServerSdkName = void 0;
4
4
  exports.proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
5
- exports.proxyCheckoutServerSdkVersion = "0.0.6-prx-101.60.1";
5
+ exports.proxyCheckoutServerSdkVersion = "0.0.6-prx-101.62.1";
6
6
  exports.proxyCheckoutServerSdkUserAgent = `${exports.proxyCheckoutServerSdkName}/${exports.proxyCheckoutServerSdkVersion}`;
@@ -70,9 +70,6 @@ export class ProxySessionsResource {
70
70
  throw new Error("Proxy Checkout sessions.createHandoff requires a publishableKey option or input field.");
71
71
  }
72
72
  const payHost = input.payHost ?? this.options.payHost;
73
- if (!payHost && this.httpClient.apiHost !== "https://api.proxycheckout.com") {
74
- throw new Error("Proxy Checkout sessions.createHandoff requires a payHost option or input field when apiHost is overridden.");
75
- }
76
73
  const response = await this.httpClient.request("POST", "/proxy_sessions/handoff", {
77
74
  ...toCreateProxySessionBody(input),
78
75
  ...(input.payerDestinationUrl !== undefined
@@ -84,6 +81,11 @@ export class ProxySessionsResource {
84
81
  requestId: input.requestId,
85
82
  });
86
83
  const session = toProxySessionHandoff(response);
84
+ if (!session.handoffUrl &&
85
+ !payHost &&
86
+ this.httpClient.apiHost !== "https://api.proxycheckout.com") {
87
+ throw new Error("Proxy Checkout sessions.createHandoff requires a payHost option or input field when apiHost is overridden and the API response does not include handoff_url.");
88
+ }
87
89
  return {
88
90
  ...session,
89
91
  handoffUrl: session.handoffUrl ||
@@ -1,3 +1,3 @@
1
1
  export declare const proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
2
- export declare const proxyCheckoutServerSdkVersion = "0.0.6-prx-101.60.1";
3
- export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.6-prx-101.60.1";
2
+ export declare const proxyCheckoutServerSdkVersion = "0.0.6-prx-101.62.1";
3
+ export declare const proxyCheckoutServerSdkUserAgent = "@proxy-checkout/server-js/0.0.6-prx-101.62.1";
@@ -1,3 +1,3 @@
1
1
  export const proxyCheckoutServerSdkName = "@proxy-checkout/server-js";
2
- export const proxyCheckoutServerSdkVersion = "0.0.6-prx-101.60.1";
2
+ export const proxyCheckoutServerSdkVersion = "0.0.6-prx-101.62.1";
3
3
  export const proxyCheckoutServerSdkUserAgent = `${proxyCheckoutServerSdkName}/${proxyCheckoutServerSdkVersion}`;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "types": "./dist/esm/index.d.ts",
10
- "version": "0.0.6-prx-101.60.1",
10
+ "version": "0.0.6-prx-101.62.1",
11
11
  "devDependencies": {
12
12
  "@types/node": "^24.12.4",
13
13
  "@vitest/coverage-v8": "4.1.7",