I'm trying to use paypal's Subscribe HTML button to create an option for my mobile WEB users to subscribe to my services. I haven't found anything that says this isn't aloud with paypal, or by searching stackoverflow or google, but when I try to send my subscribers (via cmd) to "_express-checkout-mobile" instead of "_xclick-subscriptions" I get told that the "transaction is invalid."

I hope this can be done because I want to be able to use paypal to create a monthly charge that has a setup fee including the first month (which works perfectly with "set trial price") and so I can use javascript/php/forms to update the price depending upon the users selection (or by my entering the price by hand for house-calls) and then send my mobile users to a mobile site.

Essentially the price and first month charge need to be variable, and be either month-to-month or annual, for every transaction... I'm open to other ways to solve this too, but I want it to go to paypal mobile from my dynamic subscriber choices. (I have a paypay verified business account btw).

Example "testing" code with php etc.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="robwestx@gmail.com">


<!-- Specify a Subscribe button. -->
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<!-- Identify the subscription. -->
<input type="hidden" name="item_name" value="<? echo $_POST['my_item']; ?>">
<input type="hidden" name="item_number" value="">

<!-- Set the terms of the trial period (e.g. first month/year with setup). -->
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="a1" value="<? echo $my_total; ?>">
<input type="hidden" name="p1" value="1">
<? 
 if($_POST['onoffswitch']){//Monthly or annual
 echo '<input type="hidden" name="t1" value="Y">';
 }else{
 echo '<input type="hidden" name="t1" value="M">';
 }
?>



<!-- Set the terms of the regular subscription. -->
<input type="hidden" name="a3" value="<? echo $my_mo_total; ?>">
<input type="hidden" name="p3" value="1">
    <? 
 if($_POST['onoffswitch']){
 echo '<input type="hidden" name="t3" value="Y">';
 }else{
 echo '<input type="hidden" name="t3" value="M">';
 }
?>


<!-- Set recurring payments until canceled. -->
<input type="hidden" name="src" value="1">

<!-- Display the payment button. -->
<input type="image" name="submit" border="0"
src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_LG.gif"
alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1"
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>

I found this, but I can't even get the mobile version with subscription. (Paypal Standard not redirecting to mobile checkout when discount_amount posted)

有帮助吗?

解决方案

Thanks Patrick. This solves my question.

But I do wonder why they would not allow these select types to forward to mobile optimized "at this time." If there is a different payment method that WILL work with mobile that will do what I want (*above) then please someone let me know because this is frustrating.

If someone else is looking for Paypal Mobile Payments Standard, or Express Checkout on Mobile, with Subscriptions then the answer is:

Note: Merchants that are integrated with the “Donate”, “Add to Cart”, or “Subscribe” buttons will not benefit from the mobile optimized experience at all at this time. Their customers will continue to go through the current payment experience on mobile devices.

https://developer.paypal.com/webapps/developer/docs/classic/products/mobile-paypal-payments-standard/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top