Reputation: 8594
I am trying to setup a sandbox for PayPal Smart Buttons to test before I release to production.
When I go to PayPal Subscriptions, I select my plan and click 'Copy Code'. The result is:
<div id="paypal-button-container"></div>
<script src="https://www.paypal.com/sdk/js?client-id=XXX&vault=true" data-sdk-integration-source="button-factory"></script>
<script>
paypal.Buttons({
....
createSubscription: function(data, actions) {
return actions.subscription.create({
'plan_id': 'P-YYYY'
});
},
onApprove: function(data, actions) {
alert(data.subscriptionID);
}
}).render('#paypal-button-container');
</script>
Is there a way to enable sandbox for logging in? I see that I can create sandbox accounts at Developer Accounts page but the sandbox accounts created there do not work (I mean how is it supposed to know I am in 'sandbox mode'?)
Upvotes: 1
Views: 584
Reputation: 30369
The sandbox and live environments are completely separate.
Using a sandbox business account, log into the www.sandbox.paypal.com environment, and then you can go to:
https://www.sandbox.paypal.com/billing/overview (same as your link, but with 'sandbox.' in the URL.
Create sandbox plans there. These sandbox subscriptions can be tested with sandbox personal accounts.
Upvotes: 2