Invoking the button click programmatically

K_Kong
Contributor
Contributor

In https://developer.paypal.com/docs/checkout/how-to/server-integration/#1-set-up-your-client-to-call-y..., there is:

 

<script>
  paypal.Button.render({
    env: 'sandbox',
    // Set up the payment:
    // 1. Add a payment callback
    payment: function(data, actions) {
      // 2. Make a request to your server
      return actions.request.post('/my-api/create-payment/')
        .then(function(res) {
          // 3. Return res.id from the response
          return res.id;
        });
    }, ...

Is there a way to invoke the payment callback programmatically other than for a human to click the PayPal button?

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.