News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Unknown Paid Subscriptions transaction type

Started by Darkness7148, August 24, 2011, 08:43:12 AM

Previous topic - Next topic

Darkness7148

I seem to be having a couple of problems with subscriptions. It was working perfectly when I was using the earlier RCs. Since I upgraded to 2.0, it's just not even working anymore.

First problem: The user is going through Paypal for a subscription. It gives me the money. IPN is enabled with the correct URL but it's not adding them to the membergroup and there's errors in the error log like:

Unknown Paid Subscriptions transaction type.

The error includes other stuff from the transcation as well.

The second problem, is that any payment that goes to my paypal account (like for ebay), the IPN is contacting my forum regardless and it's giving a similar error in the error log.

It sounds similar to what's described here: http://www.simplemachines.org/community/index.php?topic=376650.0

antoniosaucedo

I got the same trouble! Can you solve it? Thanks

Aleksi "Lex" Kilpinen

Please make sure all the files related to subscriptions are up to date, and that both the forum and PayPal side settings are correct.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

antoniosaucedo

Hi Aleksi, when I update the forum then the subscriptions update to or I need to update manually the subscriptions, Thanks

Sir Osis of Liver


Several things about paid subscriptions:

- There's a bug that causes subscriptions to fail if guests are not allowed to view forums.  There's also a simple fix -

http://www.simplemachines.org/community/index.php?topic=454176.0

- If you have enabled IPN on your Paypal account, you'll get an error from the subscriptions handler any time a payment is made to your account for any purpose other than a subscription, because an IPN will be sent regardless of the source/purpose of payment.  The solution is to disable IPN - you don't need it.  Subscriptions-PayPal.php sends a notify_url with each subscription, which overrides the IPN account setting.  Paypal will send an IPN when it receives the notify_url, regardless of whether IPN  is enabled or disabled.

- Paid subs generates a lot of different errors that don't seem to affect it's functionality.  I've been collecting them, and when I run out of better things to do, will try to determine the cause.



Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

agentblackhat

Quote from: Krash on October 10, 2011, 10:16:54 PM

Several things about paid subscriptions:

- There's a bug that causes subscriptions to fail if guests are not allowed to view forums.  There's also a simple fix -

http://www.simplemachines.org/community/index.php?topic=454176.0

- If you have enabled IPN on your Paypal account, you'll get an error from the subscriptions handler any time a payment is made to your account for any purpose other than a subscription, because an IPN will be sent regardless of the source/purpose of payment.  The solution is to disable IPN - you don't need it.  Subscriptions-PayPal.php sends a notify_url with each subscription, which overrides the IPN account setting.  Paypal will send an IPN when it receives the notify_url, regardless of whether IPN  is enabled or disabled.

- Paid subs generates a lot of different errors that don't seem to affect it's functionality.  I've been collecting them, and when I run out of better things to do, will try to determine the cause.

I am sorry for bringing up an old topic but this si very relevant to me.

When you say "turn off IPN", do you simply mean the IPN messages? Or turn IPB off completely? Because inside SMF it wants em to setup the notification URL.

Sir Osis of Liver

It is not necessary to enable IPN in your PayPal account.  If you do, and are using the account for other purposes, Paid Subs will receive an IPN every time a payment is made to the account.  It does no harm, but will generate Paid Subs transaction errors if the payments are not for subscriptions. You can disable IPN in your PP account, and IPNs will still be posted to the forum for subscription payments, but not for unrelated payments.

Note:
For subscriptions to be automatically updated for your users, you will need to setup a return URL for each of your payment methods. For all payment types, this return URL should be set as:

  •  http://www.thekrashsite.com/smf20/subscriptions.php


This is incorrect, and hopefully will be removed in 2.1.


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

Because it's not necessary, and creates the problem described above.  Paid Subs sends PayPal a notify_url with the payment info -



// All the standard bits.
$return_data['hidden']['business'] = $modSettings['paypal_email'];
$return_data['hidden']['item_name'] = $sub_data['name'] . ' ' . $txt['subscription'];
$return_data['hidden']['item_number'] = $unique_id;
$return_data['hidden']['currency_code'] = strtoupper($modSettings['paid_currency_code']);
$return_data['hidden']['no_shipping'] = 1;
$return_data['hidden']['no_note'] = 1;
$return_data['hidden']['amount'] = $value;
$return_data['hidden']['cmd'] = !$sub_data['repeatable'] ? '_xclick' : '_xclick-subscriptions';
$return_data['hidden']['return'] = $return_url;
$return_data['hidden']['a3'] = $value;
$return_data['hidden']['src'] = 1;
$return_data['hidden']['notify_url'] = $boardurl . '/subscriptions.php';



This supersedes the PayPal account IPN settings, and sends the IPN to the forum.  You can set up Paid Subs with anyone's PayPal account, and your forum will still receive an IPN, regardless of the account settings.  It's how the API works.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

good to know. thanks.   I've never actually used the subscription service myself...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

I also recall actually fixing some of this stuff in 2.1 and had asked for this to be checked out by other people many times over the last months... :(

Kindred

they may have done so... I'll check into it.   All I know is that *I* have never used the paypal/subscription stuff on my own sites.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

The 2.1 alpha that I have installed is from May, so may be outdated, but it contains the following in Paid Subs settings -

Note:
For subscriptions to be automatically updated for your users, you will need to setup a return URL for each of your payment methods. For all payment types, this return URL should be set as:

  •  http://www.thekrashsite.com/smf21/subscriptions.php

You can edit the link for paypal directly, by clicking here.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

I wasn't so worried about fixing that part.

I was, however, much more interested in fixing the transaction types that weren't defined, and even back when you had a beta tester badge I *specifically* asked you to test it - knowing full well that you had had the most issues with it...

Sir Osis of Liver

Unfortunately, many of the forums I tried to help with Paid Subs problems lost interest before I could get sufficient access to follow it through, so the issue remained unresolved. 

The specific problem discussed here could be solved if the form handler checked the IPN for a valid txn_type (subscr_payment is one, I believe there are a couple of others).  If not recognized, IPN would be ignored and no error generated. 

IIRC, a transaction type error also occurs if an invalid currency type is used, this happened on a couple of forums. 

One of the difficulties with Paid Subs is that the error handling is not very specific, and the transaction type error is a catchall for a variety of glitches that are not otherwise identified.
 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

QuoteThe specific problem discussed here could be solved if the form handler checked the IPN for a valid txn_type (subscr_payment is one, I believe there are a couple of others).  If not recognized, IPN would be ignored and no error generated.

Which is SPECIFICALLY the problem I attempted to rectify in 2.1 which I asked you months and months ago to take a look at for me.

QuoteIIRC, a transaction type error also occurs if an invalid currency type is used, this happened on a couple of forums. 

Which is also something I deliberately tackled in 2.1 months ago by adding more currencies.

QuoteOne of the difficulties with Paid Subs is that the error handling is not very specific, and the transaction type error is a catchall for a variety of glitches that are not otherwise identified.

There should be fewer of these in general.

Sir Osis of Liver

The biggest problem is that Paid Subs seems to behave differently depending on various combinations of forum settings and mods, host configuration, and PayPal API.  Makes it very difficult to pin down a specific cause when something goes wrong.  Also doesn't help that it has always worked fine on my test forums, and I'm unable to duplicate most of the problems, so I can only pursue them as far as forum owners allow me access.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

agentblackhat

I fixed the issue, I needed to upgrade my paypal account to a business account. 

However, a user subscribed today and SMF has added a subscription but the end date is 2005 and it says "finished". So i'm back to square one.


Sir Osis of Liver

Paid Subs works with a personal PP account, but they don't allow recurring payments unless you upgrade to business.  Will have some time to look at it tonight.  Can you pm temporary admin access?  Who is your host?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: