@paypal/checkout-components 5.0.288-alpha.21 → 5.0.288-alpha.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paypal/checkout-components",
3
- "version": "5.0.288-alpha.21",
3
+ "version": "5.0.288-alpha.22",
4
4
  "description": "PayPal Checkout components, for integrating checkout products.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,7 +1,7 @@
1
1
  /* @flow */
2
2
  import { ZalgoPromise } from "@krakenjs/zalgo-promise/src";
3
3
  import { request, noop } from "@krakenjs/belter/src";
4
- import { getSDKHost, getClientID, getEnv } from "@paypal/sdk-client/src";
4
+ import { getSDKHost, getClientID } from "@paypal/sdk-client/src";
5
5
 
6
6
  import { getButtonsComponent } from "../zoid/buttons";
7
7
 
@@ -95,9 +95,7 @@ export const getHostedButtonCreateOrder = ({
95
95
  return (data) => {
96
96
  const userInputs = window.__pp_form_fields?.getUserInputs?.() || {};
97
97
  return request({
98
- url: `${
99
- getEnv() === "local" ? baseUrl : baseUrl.replace("www", "api")
100
- }/v1/ncp/orders`,
98
+ url: `${baseUrl}/ncp/api/create-order`,
101
99
  headers: getHeaders(),
102
100
  method: "POST",
103
101
  body: JSON.stringify({
@@ -119,7 +117,7 @@ export const getHostedButtonOnApprove = ({
119
117
  }: GetCallbackProps): OnApprove => {
120
118
  return (data) => {
121
119
  return request({
122
- url: `${baseUrl}/v1/ncp/capture-order`,
120
+ url: `${baseUrl}/ncp/api/capture-order`,
123
121
  headers: getHeaders(),
124
122
  method: "POST",
125
123
  body: JSON.stringify({