UPD: change paypal sandbox account
This commit is contained in:
parent
798a5e7bcc
commit
f751aead78
@ -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);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user