Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: emmanova on October 11, 2011, 09:06:20 AM

Title: Subscription Payment going to wrong PayPal
Post by: emmanova on October 11, 2011, 09:06:20 AM
Ok I've been searching and cannot find the exact problem I am experiencing. When I started using the Subscription option I started to use my personal email account for paypal. (my personal email). Recently I created a Paypal account for the car club. So I went to Subzription settings and changed the email from my personal to the car club one.

I noticed that people renew or pay for their subscription. I get an email saying I received a payment, minutes later I receive an email:

The following error occurred when processing a paid subscription
---------------------------------------------------------------
Unknown Paid Subscriptions transaction type.

The account doesnt get renew or activated as a subscription. When I go to the car club paypal no payment is there but when I go to my personal the payment is there. I checked the Error Log and I can see the problem but dont know how to fix it. All the information about the payment, subscription, member, etc is correct but I noticed that under business and receiver_email is still pointing to my personal instead of my car club email.

I cannot find anywhere to change this email to the correct one, I think is embedded somewhere in the database.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Aleksi "Lex" Kilpinen on October 11, 2011, 09:36:38 AM
If someone does a completely new subscription, does it work correctly?
If someone renews a subscription, do they do it manually or through the paypal recurring payments?
Have you made sure the paypal address for subscriptions is correct in the forum settings, and that the IPN settings are correct on that new paypal account?
Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 11, 2011, 10:27:53 AM
Quote from: Aleksi "Lex" Kilpinen on October 11, 2011, 09:36:38 AM
If someone does a completely new subscription, does it work correctly?
If someone renews a subscription, do they do it manually or through the paypal recurring payments?
Have you made sure the paypal address for subscriptions is correct in the forum settings, and that the IPN settings are correct on that new paypal account?

Thanks for the fast reply.

- I haven't tested a new subscription
- The renew is done by the SMF not by the PayPal renewal. Like I mentioned I can see the whole process in the Error log. Meaning the Subscription feature is trying to Auto Renew. But is sending the Payment to the wrong Paypal email account and Im sure is failing because when it tries to confirm the emails dont match.
- Yes I know the PayPal settings are right because I compared them, I went trough every setting since I am started to get this error and the IPN is working because the Donation Add-On works and it requires the IPN to be on.

I think what I need to find is how to change that email address that is embedded somewhere.

Thanks in advance
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 11, 2011, 03:23:33 PM

The Paypal email address does not exist in smf_log_subscribed, which contains the member subscriptions data, or smf_subscriptions, which contains the subscriptions info.  The only place I see it is in smf_settings, and it updates when you change the payment address.

The "unknown transaction type" error occurs when any payment other than a subscription is made to the account.  If IPN is enabled, an IPN is posted to the notification url regardless of the source/purpose, and the subs handler doesn't recognize it and throws the error.

It is not necessary to have IPN enabled for paid subs.  Subscriptions-PayPal.php sends a notify_url to Paypal, which contains the return url to your forum's subscriptions.php, and it overrides IPN settings.  Doesn't matter what they are.

If you are disallowing guests from browsing the forum, subs won't work.  It's a bug, and there's a simple fix posted elsewhere on this board.

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

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 11, 2011, 04:26:15 PM
Thanks Krash but the problem im having is that the payment. Is still going to the wrong paypal account.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 11, 2011, 04:34:15 PM

Don't see how.  If the Paypal email address is correct in Admin -> Paid Subs -> Settings, then it's correct in the db, and that's where Subscriptions-PayPal.php will send it.  Are you running the PaypalDonations mod?

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 11, 2011, 04:59:40 PM
Yes that's why is not making sense to me since there is only one place to change it and I did. I do have a donation addon but that is going to the right account.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 11, 2011, 05:02:24 PM

What is the donation addon?

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 11, 2011, 05:12:39 PM
Quote from: Krash. on October 11, 2011, 05:02:24 PM

What is the donation addon?

Is called Treasury
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 11, 2011, 05:54:03 PM

Not familiar with the Treasury mod, but it's likely to be the cause of the problem.  Try uninstalling it and see if subscriptions work properly.

Don't know why you're using an addon for donations - Paypal gives you the code you need to add a donations button, and it doesn't interfere with the forum.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 11, 2011, 06:05:58 PM
Quote from: Krash. on October 11, 2011, 05:54:03 PM

Not familiar with the Treasury mod, but it's likely to be the cause of the problem.  Try uninstalling it and see if subscriptions work properly.

Don't know why you're using an addon for donations - Paypal gives you the code you need to add a donations button, and it doesn't interfere with the forum.

I am using treasury because it gives me a record of who paid bt member, also when a member gives a donation their group gets change to donation. I doubt is the mod since that work fine and payments are going to the right place. Also the error log I see in the forum shows the whole subscription transaction but it shows the wrong email.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 11, 2011, 06:09:31 PM

PM one of the errors (all of it) so I can see what you're getting.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 11, 2011, 06:28:28 PM
Quote from: Krash. on October 11, 2011, 06:09:31 PM

PM one of the errors (all of it) so I can see what you're getting.

Im on my phone but when I get home I post the error here. I have to edit some info since it contains sensitive information but it will give you the idea of the problem.
Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 11, 2011, 09:32:41 PM
Here is the error log I get. Please be aware that I had to edit the email address for security purpose. When I first setup the subscription I used my personal email ******@gmail.com and it was working fine. Then I changed it to ******@xecofl.com in the Subscription settings but as you can see in the Error Log under business and receiver emails it keep saying ******@gmail.com

When I check my gmail paypal account the payment is there instead of the xecofl.com payal account. Why it keep going to my gmail account even after I changed the PayPal email to xecofl.com thats the part that I am getting confuse and dont know how to fix it.

http://xecofl.com/forum/subscriptions.php
Unknown Paid Subscriptions transaction type.
transaction_subject:
payment_date: 06:49:10 Oct 10, 2011 PDT
txn_type: subscr_payment
subscr_id: I-9CDC9XMXJRSC
last_name: "lastnameofmember"
residence_country: US
item_name: Xtreme Membership Subscription
payment_gross: 3.00
mc_currency: USD
business: ******@gmail.com
payment_type: instant
protection_eligibility: Ineligible
verify_sign: A96dKwCYsMA3hCqADuhQGVlvebMhAaneT800e8rHC3JQlGP9tGTszvmq
payer_status: verified
payer_email: ******@yahoo.com
txn_id: 29J944716G911494V
receiver_email: ******@gmail.com
first_name: "Nameofmember"
payer_id: CYL58RNPJB89A
receiver_id: MSM5HNFU7ZJA4
item_number: 1+372
payment_status: Completed
payment_fee: 0.39
mc_fee: 0.39
mc_gross: 3.00
charset: windows-1252
notify_version: 3.4
ipn_track_id: ANvG4rX52vHgdO0OiEeNKg
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 11, 2011, 11:27:59 PM

I need the error header to see where it's coming from.  Would help if you could set up a temporary admin account that I can use to check your settings and look through your error logs.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 12, 2011, 12:29:00 AM
Quote from: Krash. on October 11, 2011, 11:27:59 PM

I need the error header to see where it's coming from.  Would help if you could set up a temporary admin account that I can use to check your settings and look through your error logs.

How can I get the error header. Even tho I appreciate a lot your help since I dont see a support team watching this thread. Hope you understand I cannot give you an admin access :)
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 12, 2011, 12:33:10 AM

Header looks like this -

   Guest                                                         October 11, 2011, 07:29:15 AM
   66.211.170.66                                           bcc8da8ab0efdf92d255fb37408d385e
                                                                     Type of error: General 
Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 12, 2011, 08:18:13 AM
Here:

Guest
66.211.170.66   
      10-10-2011, 08:49:26
39edc8c79f7ea9896b20630b5ee00c30
Type of error: General
Title: Re: Subscription Payment going to wrong PayPal
Post by: IchBin™ on October 12, 2011, 10:21:03 AM
Quote from: emmanova on October 12, 2011, 12:29:00 AM
Quote from: Krash. on October 11, 2011, 11:27:59 PM

I need the error header to see where it's coming from.  Would help if you could set up a temporary admin account that I can use to check your settings and look through your error logs.

How can I get the error header. Even tho I appreciate a lot your help since I dont see a support team watching this thread. Hope you understand I cannot give you an admin access :)

I think the problem is that not many people use or understand the subscriptions feature. While the Team may not be posting, you can be sure that team members watch the development boards. I've been tracking this topic to see what comes. krash has posted pretty much everything I would have thought of so... we'll just have to see I guess.

While krash may not be a team member, and I'm not going to suggest you do give him admin, I would like to point out that he's been helping people around here pretty consistently. He's even reported and posted some proposed fixes for a couple of bugs, including one with the subscriptions feature in the last little while.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 12, 2011, 02:38:00 PM

Thanks for that paid kind endorsement.  ;)


Ok, if I understand the problem correctly, this is what we have:

- In Admin -> Paid Subscriptions -> Settings the 'Paypal email address' is  ******@xecofl.com.
- When you subscribe, the 'Order' button lands you at the ******@gmail.com account at Paypal.
- Payment is successful, but subscription fails.

Next thing to do is:

- Get into phpmyadmin from your cpanel.
- Load the forum database, and select the smf_settings table.
- Look for paid_email_to and paypal_email fields.  What are the values?
- Search the database for ******@gmail.com.  Make sure you search the entire db, not a selected table (click on the db name at top of page). 



Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 12, 2011, 06:43:32 PM
@IchBin - I do appreciate the confidence and the good word your are giving me about Krash. I do appreciate the help he is giving me and that is why I am working with him. And I am more than glad that I found someone that is willing to help me figure it out this. I always try to figure it out things on my own or research but this time i had to post in the forum. I am willing to post as much information I can to help krash help me. if at the end we can figure it out what is the problem this thread will help others.

@Krash - You not only got it correctly you got it exactly at what the problem is. I search the database looking from where is getting those old emails. Even on smf_settings and I couldnt find anything. I will slap my face if now I see it. I look that table like 4 times. But I will do that right now.
Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 12, 2011, 07:01:16 PM
Quote from: Krash. on October 12, 2011, 02:38:00 PM

Thanks for that paid kind endorsement.  ;)


Ok, if I understand the problem correctly, this is what we have:

- In Admin -> Paid Subscriptions -> Settings the 'Paypal email address' is  ******@xecofl.com.
- When you subscribe, the 'Order' button lands you at the ******@gmail.com account at Paypal.
- Payment is successful, but subscription fails.

Next thing to do is:

- Get into phpmyadmin from your cpanel.
- Load the forum database, and select the smf_settings table.
- Look for paid_email_to and paypal_email fields.  What are the values?
- Search the database for ******@gmail.com.  Make sure you search the entire db, not a selected table (click on the db name at top of page).

Correction. I did search there but not since I didnt find the gmail account I assume that wasnt the right database. OK I found paypal_email and it says xecofl.com and paid_email it says 1. I dont have paid_email_to.

This is the Search Result:

1 match inside table smf_invites
2 matches inside table smf_log_errors
1 match inside table smf_members
2 matches inside table smf_personal_messages
3544 matches inside table smf_messages
Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 12, 2011, 07:16:42 PM
I was just browsing those tables where the gmail account showed up. And I just though on something. I am the main administrator of the forum and my email is the gmail.com

Do you think the forum is ignoring the email under Paid Subscription and sending the payment to the main admin which is me and is the same gmail account?
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 12, 2011, 08:55:24 PM
Quote from: emmanova on October 12, 2011, 07:16:42 PM
Do you think the forum is ignoring the email under Paid Subscription and sending the payment to the main admin which is me and is the same gmail account?

No, that's not how it works.  Paid Subscriptions should be using the Paypal account that's in Settings.  Just looked through the Treasury mod code, and that's the most likely suspect at this point.  It creates it's own tables, which will not affect subscriptions, but also makes changes to smf_settings.  It does not modify any of the subscriptions scripts.  You have the correct email address in one of the fields in smf_settings, but I'm not sure why the others are different.  Treasury appears to have it's own handler to process Paypal IPNs (ipntreas.php). 

A few more questions:

- Which Paypal account is Treasury using?
- Do you have Paypal IPN enabled?
- What is the notification url?
- Did you have the 1.1.1x subscriptions mod  installed before you upgraded to 2.0?
- Which invitation mod are you running?



Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 12, 2011, 09:34:07 PM
Quote from: Krash. on October 12, 2011, 08:55:24 PM
Quote from: emmanova on October 12, 2011, 07:16:42 PM
Do you think the forum is ignoring the email under Paid Subscription and sending the payment to the main admin which is me and is the same gmail account?

No, that's not how it works.  Paid Subscriptions should be using the Paypal account that's in Settings.  Just looked through the Treasury mod code, and that's the most likely suspect at this point.  It creates it's own tables, which will not affect subscriptions, but also makes changes to smf_settings.  It does not modify any of the subscriptions scripts.  You have the correct email address in one of the fields in smf_settings, but I'm not sure why the others are different.  Treasury appears to have it's own handler to process Paypal IPNs (ipntreas.php). 

A few more questions:

- Which Paypal account is Treasury using?
- Do you have Paypal IPN enabled?
- What is the notification url?
- Did you have the 1.1.1x subscriptions mod  installed before you upgraded to 2.0?
- Which invitation mod are you running?

What I can try to do is disable the Treasure completely and see if that fix it. Thanks for the answer, thats the only thing I was thinking because other than messages is the only place that has that gmail account. Yes Treasury has is onwn handler and dont even use the return URL so I can use the one for subscriptions.

Treasury is using the xecofl.com PayPal. Members have been paying trough there and it goes to the right PayPal account.
Yes IPN is enable. I do know that Treasury and Subscriptions need the IPN enabled.
The notification URL is the one listed under Subscriptions http://xecofl.com/forum/subscriptions.php
Treasure use its own but i dont know which one. This is what they say in their ReadMe:
"The URL you set here is NOT important as Treasury operates from its own Notify and Return URLs which ignore, and are independent of, your PayPal settings.
• Why? If you already have an IPN setting activated for some other program, it will continue to function for that program.
• Example? If you have already set your IPN URL so that you can use, say, Paid Subscriptions, then you can leave the URL on PayPal as it is, and still use Treasury."

Im sureThe URL you set here is NOT important as Treasury operates from its own Notify and Return URLs which ignore, and are independent of, your PayPal settings.
• Why? If you already have an IPN setting activated for some other program, it will continue to function for that program.
• Example? If you have already set your IPN URL so that you can use, say, Paid Subscriptions, then you can leave the URL on PayPal as it is, and still use Treasury.

I dont remember if I had version 1.1 before I upgrade I think at one point I had to removed it  completly and reinstall it to make it compatible.
I was using an invitation mod but I no longer use it since is not compatible anymore with the latest SMF version, I still went ahead and changed the email to xecofl.com unless I can delete that database section?

I will be leaving on vacation tomorrow so I will not be able to continue troubleshooting this until I come back Tuesday. But you can still help me since I can check on my phone.

Thanks a lot for this time that you are spending to help me resolve this issue.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 12, 2011, 10:26:17 PM

Link to your forum?

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 12, 2011, 10:30:27 PM
Quote from: Krash. on October 12, 2011, 10:26:17 PM

Link to your forum?

I though you will figure it out ^_^
http://www.XECOFL.com/forum
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 12, 2011, 10:56:18 PM
Actually, I'd already been there. (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Frolleyes.gif&hash=ca10c185942636e0afc5cc09d07dded9f2b57aed)

Two things are wrong here, separate but related:

1. Your order button is going to a different account than the one configured in settings.  The database value is correct - paypal_email is the Paypal account setting, and Subscriptions-PayPal.php will go there even if it's an invalid account. 

2. Subs are not activating.  Doesn't matter which Paypal account you put in Settings, could be mine, anybody's, and it doesn't matter what the IPN settings are, your subscriptions.php should receive a valid IPN and activate the sub.  This is exactly what the allow_guestAccess bug does, but you're not disallowing guests from browsing forums, so it shouldn't affect you.

First thing to do is upload clean files, straight out of the large upgrade package.  Replace /subscriptions.php, /Sources/Subscriptions-PayPal.php, and /Sources/ManagePaid.php, then check the subscriptions Paypal account setting.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 12, 2011, 11:03:22 PM
Wow Krash I guess you don't sleep lol. I do appreciate what you are doing. Take a break. When I come back Tuesday ill upload those files. Thanks.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 12, 2011, 11:08:23 PM
Enjoy your vacation.  PM me when you get back, so I'll know to pick this up.  (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Fwave.gif&hash=f6c2238dceeab29b9066a3f886b4349320974b73)
Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 12, 2011, 11:21:51 PM
Quote from: Krash. on October 12, 2011, 11:08:23 PM
Enjoy your vacation.  PM me when you get back, so I'll know to pick this up.  (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.thekrashsite.com%2Fpics%2Fwave.gif&hash=f6c2238dceeab29b9066a3f886b4349320974b73)

Thanks. I will :)
Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 19, 2011, 07:56:11 AM
Ok Im back. Krash again thanks for everything.

OK I was going to see which version of SFM I have and to see if there is any update before I download a package to extract the files you mentioned. I found something interesting and I dont know if it has something to do with it.

When I went to the Admin to check the version I see this:
Version Information:
Forum version: SMF 2.0
Current SMF version: SMF 1.1.15

My current version is 2 but my SMF version is 1? How that happened or this is normal? Then I clicked on Details and I saw this:
SMF File                          Your Version    Current Version
SMF Package             SMF 2.0                  SMF 1.1.15
Sources                           2.0                  1.1.15
Default Templates         2.0                  1.1.12
Language Files               2.0                  1.1.15

Now the version I have is 2.0 but I see there is a security patch 2.0.1 Should I upgrade first to 2.0.1 and then install clean files? Thanks in advance.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 19, 2011, 08:26:20 PM

Don't know where the Current Version info is coming from, but Your Version is correct.  If you haven't done a lot of manual edits, d/l the 2.0.1 large upgrade package and run the upgrade.  You'll have to reinstall mods and themes with 2.0 compatible versions, but that'll clean up your install and make it easier to isolate the problem.  Backup your db in phpmyadmin before you start.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 19, 2011, 08:29:01 PM
Quote from: Krash. on October 19, 2011, 08:26:20 PM

Don't know where the Current Version info is coming from, but Your Version is correct.  If you haven't done a lot of manual edits, d/l the 2.0.1 large upgrade package and run the upgrade.  You'll have to reinstall mods and themes with 2.0 compatible versions, but that'll clean up your install and make it easier to isolate the problem.  Backup your db in phpmyadmin before you start.

Ok I will work on it
Title: Re: Subscription Payment going to wrong PayPal
Post by: emanuele on October 20, 2011, 03:57:52 AM
You can always download the patch (http://custom.simplemachines.org/upgrades/) and try to use it before do a large upgrade. ;)

The "current version" comes from smf.org, you may want to refresh the local cache by going to maintenance > scheduled tasks and running the "Fetch Simple Machines Files" task.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 20, 2011, 04:53:17 PM

Don't think the patch will tell us anything.  Something is sending the subscribers to the wrong Paypal account, even though the account setting is correct, and the smf_settings field is correct.  It doesn't get that value from anywhere else, so where is the wrong account value coming from?  Need to eliminate the possibility that a file edit was done that hardcodes the old account into the script.  Looks like Subscriptions-Paypal.php sends the subscriber to Paypal, but I don't see the query that retrieves paypal_email, and am not sure which other files are involved.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emanuele on October 20, 2011, 05:03:09 PM
Sorry, I misinterpreted emmanova's post.
Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 22, 2011, 09:21:12 AM
OK Large Upgrade Done. Now at least I get the right versions:

SMF File                              Your Version    Current Version
SMF Package                SMF 2.0.1    SMF 2.0.1
Sources                              2.0.1                  2.0.1
Default Templates            2.0                  2.0
Language Files                 2.0                  2.0

Now I just need to wait for a member to renew or register. If that doesnt happen in a week I will create one and do it myself.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 23, 2011, 12:16:44 AM

Do a subscription yourself.  Click the 'Order with Paypal' button and see where it takes you.  You can bail without hitting the 'Pay' button on Paypal.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 23, 2011, 09:50:47 AM
Quote from: Krash. on October 23, 2011, 12:16:44 AM

Do a subscription yourself.  Click the 'Order with Paypal' button and see where it takes you.  You can bail without hitting the 'Pay' button on Paypal.

Ok I did a subscription myself but I had to continue all the way to the end because even tho it was showing it was going to Xtreme Events it didnt show me the paypal email account so I went a head and pay for it and good news. It activated the account and the money went to the right PayPal. So far the large upgrade fixed whatever was wrong there, now I need to see the old memberships if they follow the same route.

One of the old accounts is coming due now in October 30th. If that pass I can consider this problem fixed :)
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 23, 2011, 04:20:05 PM

Recurring payments are initiated by Paypal, not the forum, so whichever account info was submitted with the initial subscription will be used for the renewal.  The recurring subscriptions should be listed in your Paypal account, but don't know if you can edit the payment data.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 23, 2011, 04:23:43 PM
Quote from: Krash. on October 23, 2011, 04:20:05 PM

Recurring payments are initiated by Paypal, not the forum, so whichever account info was submitted with the initial subscription will be used for the renewal.  The recurring subscriptions should be listed in your Paypal account, but don't know if you can edit the payment data.

So maybe the recurring is the problem then, since most of them registered when I was using the gmail account. I never seen recurring settings inside PayPal, I will take a look to see if there's anyway for me to add recurring inside Paypal xecofl and remove it from Paypal gmail.
Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 23, 2011, 04:48:16 PM
Ok I found the recurring payments under my gmail account, who knows maybe this was the problem all along, that my gmail was doing the recurring but since I changed the email in the forum, the confirmation and member status will never get updated. I read there is no way I can transfer recurring from one paypal account to another, so I guess I may have to cancel it and have them redo it. Will keep you updated.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 23, 2011, 11:00:51 PM

The subscriptions handler should receive a valid IPN from either account when Paypal processes a renewal.  Paypal merchant tech support is very good - [email protected] - you can ask if it's possible to merge the two accounts into one.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emanuele on October 24, 2011, 03:59:40 AM
So, the problem here is that emmanova changed the email of the forum and it doesn't match any more the paypal email?

Would it make sense to have a specific email for the subscriptions or it would just be a complication with not enough advantages? (asking because I'm not so expert about subscriptions)
Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 24, 2011, 08:32:14 AM
Quote from: emanuele on October 24, 2011, 03:59:40 AM
So, the problem here is that emmanova changed the email of the forum and it doesn't match any more the paypal email?

Would it make sense to have a specific email for the subscriptions or it would just be a complication with not enough advantages? (asking because I'm not so expert about subscriptions)

Yes what happened was that I started the forum using a gmail account. 4 people signed under that gmail account trough the forum. I lately changed the email address to a different email account. So any new or renewal was still going to the gmail regardless of the settings inside the forum.

Installing the patch fixed the first time registration but it seems the renewal is controlled by PayPal which I found. All I need to do now is cancel that recurring charge under the gmail account and have the members renew or get a new subscription and that will go to the right one this time.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 24, 2011, 02:34:17 PM
It would be a good idea to recommend to users that they set up a separate Paypal account for paid subscriptions.  Doesn't cost anything, and would avoid several problems.

If user enables Paypal IPN, they'll receive IPNs for payments into the account that are unrelated to paid subs.  Doesn't cause a glitch, but the subs handler throws an error for 'unknown transaction type'.  It's not necessary to have IPN enabled - Subscriptions-Paypal.php sends a notify_url, which overrides IPN settings and forces an IPN post to subscriptions.php.  Unfortunately, admin settings directs users to enable IPN.

Recurring payments are not well understood, and caused the problem discussed here, and a different one on another forum I'm working on.  The recurring payments are not initiated by SMF, they're handled by Paypal without any input from the forum, and use the data that's in Paypal's database from the initial subscription.  This can cause problems if the forum url changes, the Paypal account is changed in subscription settings, or if the forum cleans up the member database or otherwise deletes members.  Paypal will continue charging renewals for members that are long gone.  I don't know if there's a way to cancel recurring subs in SMF, but we've been doing it in the user's Paypal account.

Paid subs generates a lot of errors for a lot of reasons, and it's difficult to determine what's happening unless you've spent a lot of time tinkering with it.  The front end looks simple and works well, but it's actually doing some complicated things going back and forth with Paypal, and there really should be some decent documentation for forum owners.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 24, 2011, 02:47:51 PM
Yes Krash you are right, there is not way to cancel recurring payments inside the forum, everything need to be done inside PayPal. All I can do insisde the forum is deactivate the membership but that doesnt cancel the recurring payment since like you said and I confirmed is handled by PayPal.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 26, 2011, 01:58:39 PM

For the devs, from Paypal support:


"Does Paypal allow SMF users to modify recurring
payments with appropriate script?"


You can use the "ManageRecurringPaymentsProfileStatus" to Cancel/Suspend your subscription using API's:

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_ManageRecurringPaymentsProfileStatus


SDK's and code samples (under PayPal API: Name-Value Pair Interface)

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_download_sdks


This way, if a buyer cancels the subscription in your SMF, you can perform an API request:

METHOD = ManageRecurringPaymentsProfileStatus
VERSION = 71.0
PROFILEID = I-7JJWSYHMF77L
ACTION = Cancel
NOTE = Manage RP Note

so that it will be cancelled in PayPal as well.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 26, 2011, 10:05:06 PM
Also for everyone's knowledge. I went ahead and cancelled the recurring payments from my gmail account. And guess what, I received an email from the forum saying the following for every account:

mannyz,

The following error occurred when processing a paid subscription
---------------------------------------------------------------
Unknown Paid Subscriptions transaction type.

Regards,
The Xtreme Events: Cars of Florida Team.

Which means that the forum does check the subscription every often, because this accounts are not ready for renewal but I did get this notification as soon as I cancelled the subscription from the PayPal gmail account. So I assume that the website check the PayPal account once in a while to confirm the account still active, since I cancelled inside PayPal now the forum is telling me.

So Krash even that the forum doesnt initiate the recurring or setup the recurring and we dont have any control from inside the forum for the recurring, the forum does check the recurring. :o
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on October 26, 2011, 10:46:05 PM

No, it doesn't.  When you cancel a recurring payment in your Paypal account, Paypal posts an IPN to subscriptions.php for txn_type: subscr_cancel.  It's informing the forum that the subscription was cancelled, but the handler does not recognize the cancellation, and throws the 'unknown transaction type' error.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on October 27, 2011, 09:11:17 AM
Quote from: Krash. on October 26, 2011, 10:46:05 PM

No, it doesn't.  When you cancel a recurring payment in your Paypal account, Paypal posts an IPN to subscriptions.php for txn_type: subscr_cancel.  It's informing the forum that the subscription was cancelled, but the handler does not recognize the cancellation, and throws the 'unknown transaction type' error.

Ok I see what you mean now. Well I cancelled everything, lets see if some of those decide to renew and I get back on track ^_^
Title: Re: Subscription Payment going to wrong PayPal
Post by: Joshua Dickerson on February 28, 2012, 08:46:52 PM
emmanova, do you still think this is a SMF bug? I am thinking it is a bug with that mod. If nobody can replicate it, I am going to move it to a support board.
Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on March 04, 2012, 03:22:12 PM
Quote from: Joshua Dickerson on February 28, 2012, 08:46:52 PM
emmanova, do you still think this is a SMF bug? I am thinking it is a bug with that mod. If nobody can replicate it, I am going to move it to a support board.

Thanks for the follow up. I guess the answe is yes is a bug and no is not a bug, but it was quite confusing how the whole subscription deal works. Right now is fixed but thanks to Krash help and trying to understand how this work, I was able to resolve it. Here is the summary:

1. When created the forum I used my gmail email. Everything was going to my gmail email including the subscription that was going to my PayPal account under my gmail.
2. I changed the main Forum email from gmail to my xecofl.com email.
3. When someone subscribed, the subscription was not activated and the money was still going to my gmail account. When someone renew their subscription the money was going to my gmail account, account wasnt reactivated and I was getting the error.

I fixed it (well using Krash help)
1. Went inside my gmail PayPal account and I had to delete all the subscriptions.
2. When they renew or signed up for a subscription they started going to the new xecofl PayPal account.
Title: Re: Subscription Payment going to wrong PayPal
Post by: Sir Osis of Liver on March 04, 2012, 09:56:29 PM

Strictly speaking, it's not a bug, but it does highlight some design problems in paid subs, not least of which is lack of adequate documentation.  Had good intentions to put together something for the wiki, but been taking heavy fire in the realworld since end of year, haven't had time.  Will try to get around to it when (if) things settle down, if no one else picks it up.

Title: Re: Subscription Payment going to wrong PayPal
Post by: emmanova on March 04, 2012, 10:40:49 PM
Quote from: Krash. on March 04, 2012, 09:56:29 PM

Strictly speaking, it's not a bug, but it does highlight some design problems in paid subs, not least of which is lack of adequate documentation.  Had good intentions to put together something for the wiki, but been taking heavy fire in the realworld since end of year, haven't had time.  Will try to get around to it when (if) things settle down, if no one else picks it up.

Thank you Krash that's a good translation of what I tried to say by yes and no bug lol