Digital SLR Camera



Sample Sandbox Buyer Credentials:

Buyer EmailPassword
emily_doe@buyer.comqwer1234
bill_bong@buyer.comqwer1234
jack_potter@buyer.com123456789
harry_doe@buyer.com123456789
ron_brown@buyer.comqwer1234
bella_brown@buyer.comqwer1234

Pricing Details

Camera
Tax
Insurance
Handling Fee
Estimated Shipping
Shipping Discount
Total Amount
Currency


OR

README:

1) Click on 'PayPal Checkout’ button and see the experience.
2) If you get any Firewall warning, add rule to the Firewall to allow incoming connections for your application.
3) Checkout with PayPal using a buyer sandbox account provided on this page. And you're done!
4) The sample code uses default sandbox REST App credentials which are set in index.php PayPal button section. You can get your own REST app credentials by creating a REST app with the steps outlined here.
5) Make following changes in paypal_config.php:
- If using your own Sandbox seller account, update 'client'->'sandbox' parameter in Checkout.js v4 script (in index.php and shipping.php) with your Sandbox REST app Client ID.
- env parameter oin Checkout.js v4 script: Kept 'sandbox' for working with Sandbox, it will be 'production' for LIVE.

In-Context Checkout integration steps with Checkout.js v4:

1) Copy the files and folders under 'Checkout' package to the same location where you have your shopping cart page.
2) Include the following Checkout.js v4 script on your shopping cart page:

<script type="text/javascript">
    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:    '',
                production: ''
            },

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

            // payment() is called when the button is clicked
            payment: function(data, actions) {

                // Make a call to the REST api to create the payment
                return actions.payment.create({
                     meta: {
                         partner_attribution_id: ''
                     },
                    payment: {
                        transactions: [
                            {
                                amount: { total: '0.01', currency: 'USD' }
                            }
                        ]
                    }
                });
            },

            // onAuthorize() is called when the buyer approves the payment
            onAuthorize: function(data, actions) {

                // Make a call to the REST api to execute the payment
                return actions.payment.execute().then(function() {
                    window.alert('Payment Complete!');
                });
            }

        }, '#paypal-button-container');
</script>
<script src="//www.paypalobjects.com/api/checkout.js" async></script>

3) Open your browser and navigate to your Shopping cart page. Click on 'Checkout with PayPal' button and complete the flow.
4) You can use the sample Buyer Sandbox credentials provided on index.php/home page.
5) Read overview of REST API here and find the API reference here. You can also try the interactive demo here.