From f751aead789fd526087e78c9b43fc15214493a94 Mon Sep 17 00:00:00 2001 From: "John Huang@tthqws02" Date: Fri, 12 Nov 2021 10:21:34 -0500 Subject: [PATCH] UPD: change paypal sandbox account --- src/components/mainPage/paypal.jsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/mainPage/paypal.jsx b/src/components/mainPage/paypal.jsx index 12ed2f6..c6174fb 100644 --- a/src/components/mainPage/paypal.jsx +++ b/src/components/mainPage/paypal.jsx @@ -1,21 +1,23 @@ -import React, { useState } from "react"; +import React from "react"; import { PayPalScriptProvider, PayPalButtons, FUNDING } from "@paypal/react-paypal-js"; const initialOptions = { - "client-id": "AfXKJOXmvSNSIIAxR_Vx6sTcmkrKRcVBug-cz2FV7KXEwVGzpISqfdwQHdmfR1pdvQ9Wml75fnoq1MYH", + "client-id": "AQBhJiIcG8lS4K5UoTo_-G5it85lbFpxEcA-WWBb1A-_Nq6YfKUdn05oyg-SgpxzXTyjfpdMceWskq7G", currency: "USD", intent: "capture" } - +// buyer account: dev01.oemautomation.com, pwd: 3Deerhead +// merchant account: biz01.oemautomation.com, pwd 3Deerhead const PayPal = () => { const createOrder = (data, actions) => { return actions.order.create({ purchase_units: [{ + description: "Fatek B1-14MR2 PLC", amount: { currency_code: "USD", - value: 55, + value: 89.99, } }] }); @@ -23,6 +25,7 @@ const PayPal = () => { const onApprove = (data, actions) => { return actions.order.capture().then(function(details) { + console.dir(details); alert('Transaction completed by ' + details.payer.name.given_name); }); }