Did not work, I also tried to change "paypal" to card but nothing works, any ideas?: const createOrder = (data, actions) => { // Order is created on the server and the order id is returned return fetch("http://localhost:3000/api/order/create-paypal-order", { method: "POST", headers: { "Content-Type": "application/json", }, // use the "body" param to optionally pass additional order information // like product skus and quantities body: JSON.stringify({ intent: "CAPTURE", purchase_units: [ { amount: { currency_code: "USD", value: "100.00", }, }, ], payment_source: { card: { experience_context: { payment_method_preference: "IMMEDIATE_PAYMENT_REQUIRED", payment_method_selected: "CARD", brand_name: "EXAMPLE INC", locale: "en-US", landing_page: "LOGIN", shipping_preference: "NO_SHIPPING", user_action: "PAY_NOW", return_url: "https://example.com/returnUrl", cancel_url: "https://example.com/cancelUrl", }, }, }, }), }) .then((response) => response.json()) .then((order) => order.id); };
... View more