erksch / react-smart-payment-buttons Goto Github PK
View Code? Open in Web Editor NEWReact integration for PayPal Smart Payment Buttons
React integration for PayPal Smart Payment Buttons
Hey I am not sure if this is a paypal issue or something here but I thought I would start here. So the button and everything rendered great and the implementation was really simple.. thank you! But I am having an issue with the payment processing.
I tried the button out with my sandbox account and everything went well, and then I tried in live with my live ClientId and it brings up the popup and lets me go through making a payment, but when I finish making the payment, the popup goes away and I am not seeing any transactions in the payee or my business account. I have done this 3 times, either via the paypal button or a debit card button.. each for 1$, and noticed that one of the times I got the following email.
I would assume there is no need to confirm, and my website has no way to confirm the payment. Have you experienced anything like this? I went through the documentation but am not seeing anything related to confirmations. I am a little confused because it worked so well in the sandbox, but I am thinking this may have something to do with how I have Paypal set up too as I just created the account not long ago.
I am using the REACT_APP_PAYPAL_CLIENT_ID
to provide my sandbox and live id based on my environment. The way I have implemented this is as follows:
class PayPalButtons extends React.Component<Props> {
renderButton = () => (
<SmartPaymentButtons
style={{ color: "blue" }}
loading={<CircularProgress />}
createOrder={(_data: any, actions: any) => {
return actions.order.create({
purchase_units: [
{
amount: {
value: this.props.amount || 10
}
}
]
});
}}
onApprove={() => {
this.props.enqueueSnackbar({
message: 'Success!',
});
}}
onError={() => {
this.props.enqueueSnackbar({
message: 'Error!',
});
}}
/>
);
render() {
return <PayPalSDKWrapper>{this.renderButton()}</PayPalSDKWrapper>;
}
}
And in the onAprrove, I am getting back the data param like so (I modified the orderID and payerId);
billingToken: null
orderID: "1YH66346345610333G995864S2"
payerID: "TESDT7G44UHH56D5R9X9Q"
paymentID: null
Yesterday, I realized that in my online shop all the smart payment buttons showed up even when I disabled SEPA, card, and credit.
Sometimes the buttons are rendered twice somehow.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.