Quantcast
Channel: Active questions tagged paypal - Stack Overflow
Viewing all articles
Browse latest Browse all 516

Sandbox Subscription Payment Fails with "Sorry, we couldn't set up your subscription"

$
0
0

The main problem is that when I try to make a payment in the sandbox environment (using the sandbox application and accounts), I get this error.

PayPal Error

What I Tried to Solve This Problem

I tried many approaches to solve this problem, but none of them worked. I attempted the following:

  • Used and tested the payment with live credentials instead of the sandbox.
  • Completed the business account verification and provided ID proof, address proof, and business information. PayPal customer support informed me that my account is now fully verified.

The Whole Workflow

1. I have Sandbox application

I have a sandbox application called BETA-3 with the following credentials:

  • Display App Name: BETA-3
  • Client ID: Achaeq7LP-oQgawYPr_3R5z1XYte-lqh307AcB8uDVs4OBe3uk7RlKTe1ZpCg64W_MESbX56twhQIZcX
  • Secret key 1: EJo3p9snNGnUSHw_9VAncgs2A-erN5GL8-dr3e1DRM-1I1YyQjxVuGELsx5WOYRwjSCI4-PoIkh7ZY9q

2. Sandbox Business Account Info

The previous sandbox application, BETA-3, was issued with a sandbox business account with the following information:


3. Created Plans Using the Sandbox Business Account

Using the previous sandbox business account, I created a subscription product and plans as follows:

  • Go to https://sandbox.paypal.com
  • Login using the email sb-zx7ac38078922@business.example.com and password which is Bxrd<@0%
  • From the top bar, click on "Pay $ Get Paid," then click on the submenu item "Subscriptions."
  • I created a plan with a fixed price.
  • After completing the plan setup, it provided me with a ready-to-use HTML template for the smart button, which is the following code

I have attached the payment_button.html file along with this PDF file.

<div id="paypal-button-container-P-1L3398487N541401BM72AGAA"></div><script src="https://www.paypal.com/sdk/js?client-id=Achaeq7LP-oQgawYPr_3R5z1XYte-lqh307AcB8uDVs4OBe3uk7RlKTe1ZpCg64W_MESbX56twhQIZcX&vault=true&intent=subscription" data-sdk-integration-source="button-factory"></script><script>  paypal.Buttons({      style: {          shape: 'rect',          color: 'gold',          layout: 'vertical',          label: 'subscribe'      },      createSubscription: function(data, actions) {        return actions.subscription.create({          /* Creates the subscription */          plan_id: 'P-1L3398487N541401BM72AGAA'        });      },      onApprove: function(data, actions) {        alert(data.subscriptionID); // You can add optional success message for the subscriber here      }  }).render('#paypal-button-container-P-1L3398487N541401BM72AGAA'); // Renders the PayPal button</script>

4. Test the Payment Using a Sandbox Personal Account

After I created the HTML file with the content from the previous step, I opened it. I tested making a payment using a sandbox personal account with the following credentials:

  • Email: sb-tx0yd38982407@personal.example.com
  • Password: 12341234

The initialization of the payment was successfully completed (Subscription creation was successful) as shown below:

PayPal Payment Initialization

But when I complete the payment and click on "Agree & Subscribe," the following error message is displayed:"Sorry, we couldn't set up your subscription using the card you selected. Please try another card."

PayPal payment issue


5. What I Did to Try to Solve This Problem

  • I contacted PayPal technical support, and they informed me that the problem was caused by my PayPal business account needing verification. The unverified information in my main business account affected the sandbox environment.
  • I verified my business account by providing proof of identity, proof of address, business information to PayPal support, and linked a bank account. The support agent informed me that my business account is now fully verified.
  • I tested the entire workflow using live credentials, including a real PayPal account with a real credit card, and the same result occurred.

Viewing all articles
Browse latest Browse all 516

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>