Advertisement:

Author Topic: Unknown Paid Subscriptions transaction type  (Read 8643 times)

Offline StarScream123

  • Semi-Newbie
  • *
  • Posts: 54
  • Gender: Male
    • AvPGalaxy
Unknown Paid Subscriptions transaction type
« on: August 24, 2011, 08:43:12 AM »
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

Offline antoniosaucedo

  • Semi-Newbie
  • *
  • Posts: 50
  • Gender: Male
    • Forodefoto.com
Re: Unknown Paid Subscriptions transaction type
« Reply #1 on: August 29, 2011, 09:05:27 AM »
I got the same trouble! Can you solve it? Thanks

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,295
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Unknown Paid Subscriptions transaction type
« Reply #2 on: September 28, 2011, 01:44:21 AM »
Please make sure all the files related to subscriptions are up to date, and that both the forum and PayPal side settings are correct.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"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

Offline antoniosaucedo

  • Semi-Newbie
  • *
  • Posts: 50
  • Gender: Male
    • Forodefoto.com
Re: Unknown Paid Subscriptions transaction type
« Reply #3 on: October 10, 2011, 03:03:07 PM »
Hi Aleksi, when I update the forum then the subscriptions update to or I need to update manually the subscriptions, Thanks

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,019
Re: Unknown Paid Subscriptions transaction type
« Reply #4 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.




Offline agentblackhat

  • Semi-Newbie
  • *
  • Posts: 57
Re: Unknown Paid Subscriptions transaction type
« Reply #5 on: October 14, 2014, 11:07:26 AM »

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.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,019
Re: Unknown Paid Subscriptions transaction type
« Reply #6 on: October 14, 2014, 03:58:59 PM »
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.



Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,271
  • Gender: Male
    • Kindred-999 on GitHub
Re: Unknown Paid Subscriptions transaction type
« Reply #7 on: October 14, 2014, 06:28:22 PM »
why is that incorrect?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,019
Re: Unknown Paid Subscriptions transaction type
« Reply #8 on: October 15, 2014, 01:30:57 PM »
Because it's not necessary, and creates the problem described above.  Paid Subs sends PayPal a notify_url with the payment info -

Code: [Select]

// 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.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,271
  • Gender: Male
    • Kindred-999 on GitHub
Re: Unknown Paid Subscriptions transaction type
« Reply #9 on: October 15, 2014, 05:21:15 PM »
good to know. thanks.   I've never actually used the subscription service myself...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,031
    • StoryBB/StoryBB on GitHub
Re: Unknown Paid Subscriptions transaction type
« Reply #10 on: October 16, 2014, 02:23:59 PM »
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... :(
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,271
  • Gender: Male
    • Kindred-999 on GitHub
Re: Unknown Paid Subscriptions transaction type
« Reply #11 on: October 16, 2014, 02:40:53 PM »
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.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,019
Re: Unknown Paid Subscriptions transaction type
« Reply #12 on: October 16, 2014, 03:19:21 PM »
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.


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,031
    • StoryBB/StoryBB on GitHub
Re: Unknown Paid Subscriptions transaction type
« Reply #13 on: October 16, 2014, 03:22:28 PM »
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...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,019
Re: Unknown Paid Subscriptions transaction type
« Reply #14 on: October 16, 2014, 04:04:59 PM »
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.
 

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,031
    • StoryBB/StoryBB on GitHub
Re: Unknown Paid Subscriptions transaction type
« Reply #15 on: October 16, 2014, 04:07:51 PM »
Quote
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.

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.

Quote
IIRC, 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.

Quote
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.

There should be fewer of these in general.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,019
Re: Unknown Paid Subscriptions transaction type
« Reply #16 on: October 16, 2014, 04:22:51 PM »
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.

Offline agentblackhat

  • Semi-Newbie
  • *
  • Posts: 57
Re: Unknown Paid Subscriptions transaction type
« Reply #17 on: October 17, 2014, 12:18:27 PM »
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.


Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,019
Re: Unknown Paid Subscriptions transaction type
« Reply #18 on: October 17, 2014, 02:07:23 PM »
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?