News:

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

Main Menu

Paid Subscriptions - Help

Started by DMR123, April 16, 2012, 03:07:47 PM

Previous topic - Next topic

Wazza


Wazza

Now unsure what to do?

I have created a new forum and still same error?

Here is the list I have made of my actions

1. new MySQL
2. new install of 2.0.2
3. Bring new forum to life
3. Added new Membergroup "try again" set permission to "Membership must be assigned"
4. Added one new cat & board and changed "Allowed Groups" to only be viewable by Membergroup "try again"
5. Admin/Configure optioned on all "core features" including paid subscriptions so this option is usable
6. Go to settings in Paid subscriptions Select Currency to AUD $%1.2f (I also tryed this in USD just in case this is my error)
7. Set up Subscription item "try again" then set Primary Group upon Subscription to add to "try again" cost .60c
8. Ticked Active and recurring

Now all above is active and should be ready for a purchase?

1. Added new user via regular member sign up
2. Used this new member to purchase item as set up
3. this was done with the paypal account of the new user (not my account)
4. Transaction of money worked and user has an auto-renewing subscription via the paypal system and money went to my account
5. Now all the errors start to happen the same as I already had detailed prior?
6. email saying Paid Subscription Error Occurred "Unknown Paid Subscriptions transaction type"
7. No change in groups on forum are visable.
8. Error log looks the same as the ones in our other forum.


This is band new install so I'm unsure what to do next? or am I missing a step in the setup?



Sir Osis of Liver


Don't see anything wrong with that.  Can you give me admin access to the new test install?  PM the info.

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

                                     - R. Waters

Wazza


CapadY

I can't prove it yet but I am thinking the " Lifetime subscription"  MOD is causing this problems.
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

Wazza

Quote from: CapadY on May 23, 2012, 02:28:25 AM
I can't prove it yet but I am thinking the " Lifetime subscription"  MOD is causing this problems.

Not sure, may need more info on "Lifetime subscription" Mod as I don't have this loaded? the std features allow for () x day/week/month/Year

This problem I'm having relates to the Std features and the return_url not being recognized? even in a brand new install.

Sir Osis of Liver


Will have a look soon as I get a chance.  The return url is working - the forum receives the IPN, that's what throws the error.

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

                                     - R. Waters

Sir Osis of Liver


Subscription works if I uncheck recurring payment when I order.  You can see I'm in 'Try again' membergroup.  Try it.

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

                                     - R. Waters

Wazza

Thank you Krash,    (note refund made)

So caping on what we have all learned from this?

1. "Recurring" payments is still faulty in 2.0.2 and only non recurring payments work without error
2. Only payments when set in USD will become automatically "active"
3. Any "other" payment types selected will trigger a "verify payment" within SMF and not auto activate, Admin has to do manually.

So then how do we make these features of 2.0.2 work?



Sir Osis of Liver

Recurring payments is not one of the finer points of SMF.  There is no way for a subscriber to cancel the recurring charge, nor is there an admin function to manage recurring subscriptions.  It has to be cancelled in the PayPal account.  A member can be long gone, and they will still be charged, even if the forum has been taken down completely.  Aside from the annoyance for members, and inconvenience for admins, making unauthorized charges to someone's credit card or PayPal account constitutes fraud in most jurisdictions.

Getting back to code, afaik recurring payments works in 2.0.  Just tried it on a 2.0.2 test install, and I get this error message from PayPal:  'This feature is only available to Business and Premier Accounts'.  I have a personal account, so there's no way for me to test it further.  Judging from the errors I saw in your log, I'd guess that either PayPal has changed the txn_type code for recurring payments, or it is missing/incorrect in 2.0.2.  You can contact PayPal merchant support about the former; I'll see if I can find it in the code.

As far as the currency problem, never tried it.  2.0.2 out-of-the-box has a choice of USD, EURO, GBP, and Other.  It may be designed to require verification for other than USD.  Will look at that as well.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Ok, looking in /Sources/Subscriptions-PayPal.php, it appears that the following txn_types are recognized:

  Refunded
  reversal
  subscr_payment
  web_accept

The following, which appear in your error log, are not:

  subscr_eot
  subscr_cancel
  subscr_signup

Guessing that subscr_eot is recurring payment.  You can confirm that by trying another subscription with recurring payment checked.  subscr_cancel is sent when you cancel a recurring payment.  Don't know what subscr_signup is.

The same file contains the following:



// Verify the currency!
if (strtolower($_POST['mc_currency']) != $modSettings['paid_currency_code'])
exit;



Looks like it compares the mc_currency code from the IPN with the selected currency type in subscription settings.  Since AUD is not a choice, it will return false.  This hack may fix it:



// Verify the currency!
if ((strtolower($_POST['mc_currency']) != $modSettings['paid_currency_code']) && ($_POST['mc_currency']) != 'aud'))
exit;



Don't think it's case sensitive.  Backup the original file before you try this.

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

                                     - R. Waters

Wazza

#31
Hi Krash,

Points taken

For me in each instance I had this error with the 'recurring payment' the money was taken from the members account and their PayPal account was set up with a 'recurring payment' to my PayPal 'Business' account. However in return this member never got what they paid for due to this error. So for responsible use I personally would prefer this working then removed. However at current it is much worse as this makes this open for others to make this mistake in taking money without giving a service.

Stopping a 'recurring payment'  was quite easy to do via their PayPal account or from my PayPal account I was also able to cancel or refund payment(s) made. So I don't see the problem if the site owner is responsible with his members, plus as this is only a function they can be used via a business and business PayPal Account then the consumer should have more rights if they need to pursue a business.

But at present this for SMF is a security issue and should be ether removed for the points you raised or made functional for responsible business use only. As to allow the program the option of 'recurring payment' being  currently created by SMF, but at current not being recognized by SMF in a return_url, is only going to cause future problems.

__________________________________


I will try the code changes to have this recognize the Australian Dollar "AUD"

And hope we can find an answer for above.

Thank you again for your help  :)

Wazza


Sir Osis of Liver


Posted the recurring payments problem in Bug Reports - will see if anyone confirms it.

Let me know if the mc_currency hack works.

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

                                     - R. Waters

Wazza

Will do,


...and please check and cancel any recurring payments from your PayPal account and I will refund the one that just went though.

Again thank you

Wazza

Wazza

Famous last words back up  :D


Went to "Settings" Paid subscriptions and seen a white screen reading the following


Parse error: syntax error, unexpected ')' in /home/"VPS name removed by wazza"/public_html/ATown/Sources/Subscriptions-PayPal.php on line 203

...will restore back up now  ;)

Sir Osis of Liver


Too many brackets. :P



if (strtolower($_POST['mc_currency'] != $modSettings['paid_currency_code']) && ($_POST['mc_currency']) != 'aud')




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

                                     - R. Waters

Wazza

This fix for "AUD" works a treat! Just tested in the /ATown site we created  ;)



Wazza

Krash...Happy for you or anyone you invite to use the Test site we created for testing of this issue. Admin or whatever access they need?

I'm running on dedicated VPS with WHM & CPanel access (not a shared hosting site) so can leave this offer open as long as is required.

Plus I will credit back any payments anyone makes to my PayPal account in testing.

Wazza  ;)

emanuele

Quote from: Wazza on May 23, 2012, 09:16:16 PM
2. Only payments when set in USD will become automatically "active"
From my testings (paypal sandbox), this is a wrong setting in your paypal account: you have to go to your paypal account, in profile > Payment Receiving Preferences and where it says "Block payments sent to me in a currency I do not hold:" select "No, accept them and convert them to U.S. Dollars" (at least that's what I see in my test account).


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Sir Osis of Liver


Rereading this thread, I believe the currency problem was because Subscriptions-PayPal.php does not recognize AUD, which should be the default currency type for an Australian Paypal user, so the account settings were correct.  The currency hack in Subscriptions-PayPal.php apparently fixed it.

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

                                     - R. Waters

Advertisement: