William
William

Reputation: 6556

PayPal sandbox subscription "Sorry, we couldn't set up your subscription using the payment method you've selected"

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>

enter image description here

Upvotes: 0

Views: 1694

Answers (1)

Prakhar Varshney
Prakhar Varshney

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

Related Questions