Domanda

I've got a donate page on a website I'm building for a charity. On the page they want to have two options: 'Donate' and 'Donate monthly'. These buttons should take you straight to the donations page on PayPal, however the client wants the 'Donate monthly' button to make the 'make this recurring (monthly)' box on the paypal site itself, pre-ticked.

Is there a way to do this by passing a parameter? Either via Query string or hidden input. Here is the code as it stands at the moment:

  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_donations">
    <input type="hidden" name="business" value="paypal@clientemail.org">
    <input type="hidden" name="lc" value="US">
    <input type="hidden" name="item_name" value="Client Name">
    <input type="hidden" name="item_number" value="Donate">
    <input type="hidden" name="no_note" value="0">
    <input type="hidden" name="currency_code" value="EUR">
    <input type="hidden" name="bn" value="PP-DonationsBF:donateBtnPaypal.png:NonHostedGuest">
    <input class="btn shorter diavlo book" type="submit" value="Donate monthly (&euro;)" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" >
    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  </form>
È stato utile?

Soluzione

What you could do is switch to the Express Checkout API. This would give you the ability to design those options into your own UI and pass it all over to PayPal however you want to.

If you're working with PHP my class library for PayPal will make it very easy on you. Specifically, you would be using:

Altri suggerimenti

No, its not possible to make it as default option "Make This Recurring (Monthly)"

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top