Reputation: 6556
testing sandbox with normal PayPal buying / paying for product it's working well with a test credit card that I generate. But when I try to test for subscription, this error shows up.
"Sorry, we couldn't set up your subscription using the payment method you've selected. Please try another."
<div id="paypal-button-container"></div>
<script src="https://www.paypal.com/sdk/js?client-id=xxxxxxxxxxxxxxxxxxx&vault=true" data-sdk-integration-source="button-factory"></script>
<script>
paypal.Buttons({
style: {
shape: 'rect',
color: 'blue',
layout: 'vertical',
label: 'subscribe',
},
createSubscription: function(data, actions) {
return actions.subscription.create({
'plan_id': 'P-xxxxxxxxxxx'
});
},
onApprove: function(data, actions) {
alert(data.subscriptionID);
}
}).render('#paypal-button-container');
</script>
Upvotes: 0
Views: 1694
Reputation: 257
I think it has Something to do with setup_fee while creating the plan. when I set it null ,I get the same error as yours. But when i Give it some value, it works.
Let me know , if this Works For You.
Upvotes: 2