Search code examples
paypalpaypal-sandboxsandbox

PayPal and Sandbox payment credentials : sandbox and production fields


im very new with this API. I want to generate a PayPal PAY button. I've created a SANDBOX Paypal as a vendor and as a buyer. Two accounts.

I don't know how to get 'sandbox' and 'production' fields.

I haven't created an APP, all the time ask me to confirm and email which I've confirmed 10 times.

         paypal.Button.render({

        env: 'sandbox', // sandbox | production

        // PayPal Client IDs - replace with your own
        // Create a PayPal app: https://developer.paypal.com/developer/applications/create
        client: {
            sandbox:    'AFcWxV21C7fd0v3bYYYRCpSSRl31AULfweezb3a.97AL03QEPQS.cIvX',
            production: 'QGWT5LPKXCYKNMEW'
        },

        // Show the buyer a 'Pay Now' button in the checkout flow
        commit: true,

...

i dont know how to get sandbox and production fields, inside 'client' object.

thanks!


Solution

  • To create email confirmed and verified sandbox account, please refer the below steps:

    1. Login to http://developer.paypal.com/ with your LIVE PayPal account
    2. Click Dashboard
    3. Click sandbox accounts
    4. Click Create account button on the top right corner
    5. Create a business account for seller and a personal account for buyer
    6. Please add bank account and credit card and also populate some amount to your account
    7. The email address need not be an real one.
    

    Please refer the below link for your reference for creating sandbox:

    https://developer.paypal.com/docs/classic/lifecycle/sb_create-accounts/

    Refer the following links for PayPal Express checkout client side integrations, where you can find steps to get the client id details:

    https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/client-side-REST-integration/

    https://developer.paypal.com/demo/checkout/#/pattern/client