#3368 - Usergroup subscriptions don't work through PayPal

This is a spacer post for a website comment topic. The content this topic relates to: #3368 - Usergroup subscriptions don't work through PayPal
I've run a quick test and subscription button is working for me.

However, it may be somehow an issue with your settings. Could you attach a screenshot of the usergroup subscription edit screen.

Ideally also paste the HTML for the button (original Composr code) into a note for me to analyse.
Image

(Click to enlarge)

Image

(Click to enlarge)

<form title="{!MAKE_PAYMENT}" class="left" action="{IPN_URL*}" method="post" autocomplete="off">
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<input type="hidden" name="charset" value="{!charset}" />
<input type="hidden" name="business" value="{PAYMENT_ADDRESS*}" />
<input type="hidden" name="notify_url" value="{$FIND_SCRIPT*,ecommerce,1}?from=paypal&amp;type_code={TYPE_CODE*}" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="return" value="{$PAGE_LINK*,_SEARCH:purchase:finish:type_code={TYPE_CODE}:from=paypal}" />
<input type="hidden" name="cancel_return" value="{$PAGE_LINK*,_SEARCH:purchase:finish:cancel=1:from=paypal}" />
<input type="hidden" name="currency_code" value="{CURRENCY*}" />
<input type="hidden" name="custom" value="{PURCHASE_ID*}" />
<input type="hidden" name="a3" value="{AMOUNT*}" />
<input type="hidden" name="p3" value="{LENGTH*}" />
<input type="hidden" name="t3" value="{$UCASE*,{LENGTH_UNITS}}" />
<input type="hidden" name="src" value="1" />
<input type="hidden" name="sra" value="1" />
<input type="hidden" value="1" name="no_note" />
<input type="hidden" value="{!SUBSCRIPTION_FOR,{$USERNAME*},{ITEM_NAME*}}" name="item_name" />
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="bn" value="ocproducts_SP" />

<div class="purchase_button">
<input style="border: 0px" type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
</div>
</form>
Image

(Click to enlarge)

Thanks but the output HTML please, not the Tempcode.

I need to actually hook it up to a test file with the generated data of your site and try and tweak it until it works.
<div class="purchase_screen_contents">



Your details have been stored in our database. Now you may make your payment.






<form title="Make payment" class="left" action="https://www.paypal.com/cgi-bin/webscr" method="post" autocomplete="off">
<input type="hidden" name="cmd" value="_xclick-subscriptions" />
<input type="hidden" name="charset" value="utf-8" />
<input type="hidden" name="business" value="[email protected]" />
<input type="hidden" name="notify_url" value="https://bosslife.org/data/ecommerce.php?from=paypal&amp;type_code=USERGROUP1" />
<input type="hidden" name="no_shipping" value="1" />
<input type="hidden" name="return" value="https://bosslife.org/site/index.php?page=purchase&amp;type=finish&amp;type_code=USERGROUP1&amp;from=paypal" />
<input type="hidden" name="cancel_return" value="https://bosslife.org/site/index.php?page=purchase&amp;type=finish&amp;cancel=1&amp;from=paypal" />
<input type="hidden" name="currency_code" value="USD" />
<input type="hidden" name="custom" value="1" />
<input type="hidden" name="a3" value="1.99" />
<input type="hidden" name="p3" value="1" />
<input type="hidden" name="t3" value="M" />
<input type="hidden" name="src" value="1" />
<input type="hidden" name="sra" value="1" />
<input type="hidden" value="1" name="no_note" />
<input type="hidden" value="Subscription for jmbronson (Pro Membership)" name="item_name" />
<input type="hidden" name="rm" value="2" />
<input type="hidden" name="bn" value="ocproducts_SP" />

<div class="purchase_button">
<input style="border: 0px" type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />
</div>
</form>

</div>
thanks
The code actually works if I substitute our own PayPal, so it must be account-specific somehow.

Do you have PayPal set to only accept encrypted forms?
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/encryptedwebpayments/#id08A3I0R00ZJ
This must NOT be enabled.

Also, is it a business account? Subscriptions only work on the PayPal business accounts.
That setting was enabled in my PayPal account - I've disabled it and now everything seems to be working beautifully.

Thanks much!
This may be another issue:

When viewing the 'subscriptions' module, clicking the 'Cancel subscription' button uses possible outdated variable strings in the URL.

Currently, the variables are:
?cmd=_subscr-details&search_trans_id=

This gave me an error on Paypal:

"Invalid or missing transaction ID. Please select again."

When I pull up the transaction details directly from within PayPal, these are the variables used:
?cmd=_profile-recurring-payments&encrypted_profile_id=

Using the transaction ID for 'encrypted_profile_id' does in fact retrieve the transaction details
Thanks. I see from a code review we're passing in the "purchase ID" (=subscription ID) rather than the "transaction ID".
Probably it would work if I fixed it to pass the transaction ID instead, but we don't necessarily store that.
So I'll trust your fix.
I'll attach a fixed template to this issue.
0 guests and 0 members have recently viewed this.