Я интегрирую Paypal express Оформить заказ с Гэтсби (reactjs) он отлично работает с учетными записями в песочнице, но не в производстве . Это дает мне следующую ошибку
Мой код
import React, { useState } from "react"
import PaypalExpressBtn from "react-paypal-express-checkout"
import notify from "../functions/notify"
import Api from "../functions/API"
import fbTrack from "../functions/fbTrack"
const client = {
sandbox: "sanbox_key",
production: "prod_key",
}
export default ({ plan, setUserData, setBillingHistory, setUserContact }) => {
const onSuccess = (payment) => {
const data = {
payment,
plan,
}
notify("The payment was succeeded!")
try {
fbTrack("track", "Purchase", plan.price)
} catch (e) {
// do nothing
}
// Sending the res call
Api.fetch("post", "make-payment-paypal", data).then(() => {
Api.fetch()
.then(user => {
setUserData(user)
})
Api.fetch("get", "get-contact")
.then(contact => {
setUserContact(contact)
})
Api.fetch("get", "get-billing-history")
.then(billing => {
setBillingHistory(billing)
})
}).catch(e => console.log(e))
}
const onCancel = (data) => {
notify("The payment was cancelled", "danger")
}
const onError = (err) => {
notify("Error occurred. Please retry.", "danger")
}
return <PaypalExpressBtn env={"production"} client={client} currency={plan.currency_code} total={plan.price} onError={onError}
onSuccess={onSuccess} onCancel={onCancel}/>
}
Ответ от вкладки сети для конечной точки / execute, которая дает 400
{
"ack": "contingency",
"contingency": "INSTRUMENT_DECLINED",
"meta": {
"calc": "e8cc408a47d1f",
"rlog": "rZJvnqaaQhLn%2FnmWT8cSUueWscmrtUHe5Y1Bd%2FeqyvyOTq66rSXAcvMRdZesXq1O38dITQfoakLPn1nG4pMu0qURH%2Be5YB%2B4_1709bb5bb49"
},
"server": "2mEzKB-B1lh9-OtP-2sBI96A-5Xu_ZnMt0Rz1fJ2a4n4noKlAHLadCNfrWklmy5YUKipx6UR0bGzcI9u9Q-a4b1v4LHPM9g6W4a6WmXYuh9wqhRDdbsHbYSzXX8ucZU3a4Xp-wZrSy6qYgnEZoDKzjuz_fjiBvxhxD2fNlGbF5tm_h_xd-G9FaYynEq4jwg1MYcCAXMgLLsxc2J81gNfe01GF7FRInwK5mbgWxtwed9fOwRRfBycXsn_diFRBuIJR7UEXAfmeZYIzkBATQbYfm"
}