Git Product home page Git Product logo

react-smart-payment-buttons's People

Contributors

dependabot[bot] avatar erksch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-smart-payment-buttons's Issues

Not working in IE

73953861-49ca2180-4901-11ea-8cef-96ce0e828ec0

Is not rendering the Paypal Button, and the console is throwing a syntax error, caused for an arrow function.

Payment for Live client not going through

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.

image

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.