skip to Main Content

Is it possible to sell some non-physical product and get its payment directly into your personal paypal account? Has anyone did something like this?

2

Answers


  1. It is certainly possible, and actually very easy. What kind of integration are you looking for? Maybe one of the buttons at http://www.paypal.com/buttons would be a good start for you.

    Login or Signup to reply.
  2. Here is a sample of a VERY Simple checkout Script using REST API (Client Side Only Code)
    First add this line to “head” of your HTML page:
    {

    <script src="https://www.paypal.com/sdk/js?client- 
            id=YOUR USER ID GOES HEREg&disable-funding=credit,card"></script>
    

    }

    Then add this to where you want your PayPal Button(s) to be on your HTML Page:

        '<div style="width:30%" id="paypal-button-container"><p style="font-size:small"> 
         <b>Checkout using your PayPal Acount <br>
         or if you do not have a PayPal Account, you can pay with your Debit or Credit 
         Card (option at bottom of Pop-up Window).</b></p></div>
       <script>
        // Render the PayPal button into #paypal-button-container
        paypal.Buttons({
            onError: function (err) {
                alert('An Error Occured, returning you to the Form. Please Check that you 
         are not submitting a Zero Amount and have Filled out the Form');
            },
            style: {
              layout: 'horizontal',
              color: 'gold',
              shape: 'pill',
              label: 'checkout',
              size: 'responsive',
              tagline: 'true',
            },
            // Set up the transaction
            createOrder: function(data, actions) {
                return actions.order.create({
                    purchase_units: [{
                        description: 'GnG Order',
                        amount: {
                            value: cartTotal
                        }
                    }]
                });
            },
    
            // Finalize the transaction
            onApprove: function(data, actions) {
                return actions.order.capture().then(function(details) {
                    // Show a success message to the buyer
                    alert('Transaction completed by ' + details.payer.name.given_name + 
             '!');
                });
                if (details.error === 'INSTRUMENT_DECLINED') {
                   return actions.restart();
                };
            }
    
    
           }).render('#paypal-button-container');
        </script>'
    

    That should do it for you. Be sure to login to the Developer Panel to set up your API credentials.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search