Paypal recurring payment showing suspend - paypal

I have used below code sample to implement recurring payment:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="XXXXXX">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="no_shipping" value="1">
<input type="image" src="http://www.paypal.com/en_GB/i/btn/x-click-but20.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="a3" value="1.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="D">
<input type="hidden" name="srt" value="6">
<input type="hidden" name="src" value="1">
<input type="hidden" name="return" value="XXXXXX">
<input type="hidden" name="notify_url" value="XXXXXX">
<input type="hidden" name="cancel_return" value="XXXXXX">
<input type="hidden" name="sra" value="1">
</form>
</body>
</html>
When I place order and test payment on sandbox and live both my initial payment is deducted and shows the recurring payment cycle for next day was showing due. But when I checked the next day it shows the status of recurring payment suspended. I am also attaching the screenshot from my paypal account showing suspended.

You have the maximum amount of failures set to 1. That means that if the payment fails the profile will automatically suspend after one attempt. You need to increase that number to 2 or 3.
<!-- PayPal reattempts failed recurring payments. -->
<input type="hidden" name="sra" value="1">
If you don't want an initial payment, you can add a trial period of 1 day or however long you want the trial period. Trial periods can be 0.00
<!-- Set the terms of the 1st trial period. -->
<input type="hidden" name="a1" value="0.00">
<input type="hidden" name="p1" value="1">
<input type="hidden" name="t1" value="D">
For more help, here is the Recurring Payments Subscription Guide from the PayPal Developer Site.

Related

How to discount additional recurring payments?

I want to charge $47/month for the first month. Then only $37 for every additional month. Essentially, I want to discount the recurring payments if they stay with me.
How can I do this in PayPal buttons?
<form action="https://www.paypal.com/cgi-bin/webscr" method="POST">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="your-email-address#yourdomain.com">
<input type="hidden" name="item_name" value="Subscription description here">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="a1" value="47.00"> <!-- Set this to the price you want to charge them upfront -->
<input type="hidden" name="p1" value="1"> <!-- Set the length of the trial to 1 interval (t1 will define the interval) -->
<input type="hidden" name="t1" value="M"> <!-- Set the interval to months -- trial is now one month in length -->
<input type="hidden" name="a3" value="37.00"> <!-- Amount to charge each month -->
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M"> <!-- Payments are one month apart -->
<input type="hidden" name="src" value="1"> <!-- Payments don't automatically stop -->
<input type="image" alt="PayPal - The safer, easier way to pay online!" src="https://www.paypal.com/en_US/i/btn/btn_subscribe_LG.gif">
</form>

Paypal sandbox subscription not working

PayPal subscription for sandbox not working.
Below is my code
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<!-- Identify the subscription. -->
<input type="hidden" name="item_name" value="Alice's Weekly Digest">
<input type="hidden" name="item_number" value="DIG Weekly">
<!-- Set the terms of the regular subscription. -->
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="a3" value="5.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="D">
<input type="hidden" name="notify_url" value="http://example.com/paypal/paypal.php?action=ipn">
<!-- Set recurring payments until canceled. -->
<input type="hidden" name="src" value="1">
When I am checking in my PayPal account it is creating subscription profile and display next payment due date but on that day PayPal did not deduct amount from my account and also not sending any IPN on notify url.
Am I missing something in above code?

PayPal sandbox UK Payments Pro Hosted payment page does not process card

We are trying to integrate PayPal’s UK Payments Pro with the hosted payment page.
We have created a new sandbox UK business account and a UK customer account.
Each time we attempt to make a payment, we get this error:
This transaction can't be processed. Please pay with another card.
Here is the HTML for our POST:
<iframe name="hss_iframe" width="570px" height="540px"></iframe>
<form style="display:none" target="hss_iframe" name="form_iframe" id="form_iframe" method="post" action="https://securepayments.sandbox.paypal.com/webapps/HostedSoleSolutionApp/webflow/sparta/hostedSoleSolutionProcess">
<input type="hidden" name="buyer_email" value="nata#print-science.com">
<input type="hidden" name="last_name" value="dulger">
<input type="hidden" name="first_name" value="nata">
<input type="hidden" name="notify_url" value="http://xyzprinting.he18.printscience.net/paypalprohostedipn">
<input type="hidden" name="subtotal" value="21.03">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="cancel_return" value="http://xyzprinting.he18.printscience.net/paypal_cancel_2014?order=325558RL">
<input type="hidden" name="return" value="http://xyzprinting.he18.printscience.net/paypal_successful">
<input type="hidden" name="paymentaction" value="sale" />
<input type="hidden" name="template" value="templateD" />
<input type="hidden" name="business" value="ps-uk#printscience.com" />
<input type="hidden" name="cmd" value="_hosted-payment" />
<input type="hidden" name="address1" value="123 Cheapside">
<input type="hidden" name="city" value="London">
<input type="hidden" name="state" value="London">
<input type="hidden" name="zip" value="EC2 R 8AH">
<input type="hidden" name="custom" value="325558RL">
</form>
<script type="text/javascript">
document.form_iframe.submit();
</script>
Try changing the business value to the Secure Merchant ID value that is specified at the top of the Profile page of the Sandbox Test Site. The field should contain something like:
name="business" value="HNZ3QZMCPBAAA"
See the developer guide, p.64: https://www.paypalobjects.com/webstatic/en_GB/developer/docs/pdf/hostedsolution_uk.pdf

HTML Variables for Recurring Payments Buttons with a modifier

I'm looking to add a modifier to my PayPal Subscription button. I'd like to modify the subscription cost depending upon how many users the customer enters. Essentially, the subscribe button has a "base cost", with +$xx.xx added to the monthly subscription cost.
For example:
A user wants to create an account on my app with 6 users at $5 per user with a base subscription cost of $10/mo. The monthly cost of that subscription would be $40.
This can be achieved(may not be the most optimal solution)
Go to PayPal button designer
Moreover you are an advanced user in PayPal, you can customize checkout pages for your customers, streamline checkout, and more in this section.
I needed to build the markup as such. Then, using JavaScript I was able to assign the .val() of the item_number, item_name, and a3 fields. Works great!
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top" style="display: inline-block">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="...">
<!-- Specify a Subscribe button. -->
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<!-- Identify the subscription. -->
<input type="hidden" name="item_number" monthly_item_name>
<input type="hidden" name="item_name" monthly_item_name>
<!-- Set the terms of the regular subscription. -->
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="a3" id="monthly">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<!-- Set recurring payments until canceled. -->
<input type="hidden" name="src" value="1">
<!-- Send the user back here once they've completed payment. -->
<input type="hidden" name="custom" value="<?php echo $_SESSION[ID]; ?>">
<input type="hidden" name="return" value="...">
<input type="hidden" name="rm" value="2">
<input type="submit" name="submit" class="btn btn-inverse" value="Monthly" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Upgrading issue "Amount can only be increased by 20% " in paypal

I have integrated the Paypal subscription option into my site.My problem is when i try to upgrade the subscription it shows an error in Paypal
Amount can only be increased by 20%
Subscription amount is $0.25 Upgrade amount is $0.59
How can i increase the percentage of the amount .
the code is following :
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="charset" value="utf-8">
<input type="hidden" name="business" value="freelancecoachpro#gmail.com">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="item_name" value="FreelanceCoachPro Total Connect">
<input type="hidden" name="item_number" value="7">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="a3" value="0.59">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M"> <!-- Set recurring payments until canceled. -->
<input type="hidden" name="custom" value="1388035301:63:7:b09c926d4df9a5f17221e56cbe688297:6">
<input type="hidden" name="return" value="https://www.freelancecoachpro.com/thank-you/">
<input type="hidden" name="cancel_return" value="https://www.freelancecoachpro.com/subscriptions-5/">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="notify_url" value="http://www.freelancecoachpro.com/paymentreturn/paypalexpress">
<input type="hidden" name="src" value="1">
<input type="hidden" name="modify" value="2"><!-- Display the payment button. -->
<input type="image" name="submit" border="0" src="https://www.freelancecoachpro.com/images/upgrade_button.png" alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif">
</form>
Based on the note for AMT on this page, it looks like this is a PayPal restriction (I would assume Payments Standard would have the same restriction)
Note: For recurring payments with Express Checkout, the payment amount
can be increased by no more than 20% every 180 days (starting when the
profile is created).