Advertisement:

Author Topic: Another paid subscriptions bug?  (Read 22945 times)

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 11,012
  • We were all equal in the end.
Re: Another paid subscriptions bug?
« Reply #20 on: May 28, 2012, 10:42:41 PM »


<sigh> Posted the original code wrong, but hack was correct.  Attached should be good.
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline Wazza

  • Semi-Newbie
  • *
  • Posts: 98
  • Gender: Male
Re: Another paid subscriptions bug?
« Reply #21 on: May 28, 2012, 10:52:21 PM »
Just ran in the test site if you want to look at the error log

Offline Wazza

  • Semi-Newbie
  • *
  • Posts: 98
  • Gender: Male
Re: Another paid subscriptions bug?
« Reply #22 on: May 28, 2012, 10:58:41 PM »

Quote
Unknown Paid Subscriptions transaction type.
txn_type: subscr_signup
subscr_id: I-5PD4V57CDU1S
last_name: Wazza
residence_country: AU
mc_currency: AUD
item_name: Try Again Subscription
business: warren@centralmortgage.com.au
recurring: 1
verify_sign: AQPPHRijwPigCZ-gJGYn5U5MSzblANEdfdWpAQ0QS4ENDFjO3wmDO7pS
payer_status: unverified
payer_email: Wazza
first_name: Wazza
receiver_email: warren@centralmortgage.com.au
payer_id: AYZ5QYZ4P53ZY
reattempt: 1
item_number: 1+2
subscr_date: 19:50:19 May 28, 2012 PDT
charset: windows-1252
notify_version: 3.4
period3: 1 D
mc_amount3: 0.10
ipn_track_id: c8c9a5a1ce3bc

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 11,012
  • We were all equal in the end.
Re: Another paid subscriptions bug?
« Reply #23 on: May 28, 2012, 11:12:25 PM »

Krap.  Either I buggered up the boolean, or txn_type is checked somewhere else.

“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline Wazza

  • Semi-Newbie
  • *
  • Posts: 98
  • Gender: Male
Re: Another paid subscriptions bug?
« Reply #24 on: May 28, 2012, 11:24:38 PM »
Don't bet yourself up on this one!

I think you have done real well finding and trying to fix the problem  ;)

Appreciate the effort.  :) ...Maybe if we leave it for a day, someone else may add some light to this? 


Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 11,012
  • We were all equal in the end.
Re: Another paid subscriptions bug?
« Reply #25 on: May 28, 2012, 11:27:14 PM »

Try this.
“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline Wazza

  • Semi-Newbie
  • *
  • Posts: 98
  • Gender: Male
Re: Another paid subscriptions bug?
« Reply #26 on: May 28, 2012, 11:33:22 PM »
okay doing now  ;)

Offline Wazza

  • Semi-Newbie
  • *
  • Posts: 98
  • Gender: Male
Re: Another paid subscriptions bug?
« Reply #27 on: May 28, 2012, 11:36:24 PM »
Quote
Parse error: syntax error, unexpected '{' in /home/wazza/public_html/ATown/Sources/Subscriptions-PayPal.php on line 260

Offline feline

  • SMF Hero
  • ******
  • Posts: 1,638
  • Gender: Female
Re: Another paid subscriptions bug?
« Reply #28 on: May 29, 2012, 05:14:06 AM »
Replace at line 258:
Code: [Select]
if (($_POST['txn_type'] == 'subscr_payment' || $_POST['txn_type'] == 'subscr_signup') && !empty($_POST['subscr_id'])

with:
Code: [Select]
if (($_POST['txn_type'] == 'subscr_payment' || $_POST['txn_type'] == 'subscr_signup') && !empty($_POST['subscr_id']))

Offline Sir Osis of Liver

  • SMF Super Hero
  • *******
  • Posts: 11,012
  • We were all equal in the end.
Re: Another paid subscriptions bug?
« Reply #29 on: May 29, 2012, 03:24:41 PM »

That's what I had previously.   Subscription didn't work, but didn't cause a parse error.  Something must be wrong with the boolean.



“The best laid schemes o' mice an' men / Gang aft a-gley.” - Robert Burns

Offline Restor

  • Newbie
  • *
  • Posts: 1
Re: Another paid subscriptions bug?
« Reply #30 on: June 10, 2012, 12:29:53 PM »
Hi All,

I needed the paid feature as well and did have some spare time to look into the paypal code. Actualy the code is pretty good as far as i can see.

The issue on my install why payments did not work all was because in sandbox mode the curl test statement failed which resulted in a fallback to plain http (fsockopen) which is not really bad either btw. But the problem i uncoverred here is that the verify request is done with a non ssl request on port 80 to paypal which at least for me did not verify in the sandbox. After changing the curl test to fixed sandbox and SSL port 443 the verify works like a charm.

Code: [Select]
                if (function_exists('curl_init') && $curl = curl_init('https://www.sandbox.paypal.com/cgi-bin/webscr'))
                {
                        // Set the post data.
                        curl_setopt($curl, CURLOPT_POST, true);
                        curl_setopt($curl, CURLOPT_POSTFIELDSIZE, 0);
                        curl_setopt($curl, CURLOPT_POSTFIELDS, $requestString);

                        // Fetch the data returned as a string.
                        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

                        // Fetch the data.
                        $this->return_data = curl_exec($curl);

                        // Close the session.
                        curl_close($curl);
                }
                // Otherwise good old HTTP.

I did not feel like fixing the sandbox check for now, i am now testing signing up of subcriptions and recurring payments which both seems to work flawless now. And yes you do get some IPN's which are not used about the subcription, but that is because SMF does not actualy know about the existence of the recurring payment, it just adds the amount of payed time to you current payment which had the effect of extension like a recurring subcription. If you do not receive a payment it will automaticly stop the subscription as well.

I hope this helps a but in fixing this issue.

Regards,

Offline Wazza

  • Semi-Newbie
  • *
  • Posts: 98
  • Gender: Male
Re: Another paid subscriptions bug?
« Reply #31 on: June 10, 2012, 05:54:32 PM »
Hi Restor,

Welcome too! ...great first post  :)

I will add this to the test forum later today that Krash and I have been messing with and try.

Have you still been selecting 'Allow user to auto-renew this subscription' ? with this working?

Also have you tried a live payment, not in sandbox? we were testing live with a .10c payment set up

Thank you  ;)

Offline taysan

  • Semi-Newbie
  • *
  • Posts: 37
Re: Another paid subscriptions bug?
« Reply #32 on: June 12, 2012, 12:44:46 AM »
FWIW I've had very little luck with auto renewing subscriptions.  Frankly even the initial subscription has been spotty in terms of confirming payment back from PayPal etc.

I'm constantly having to cross reference PayPal email addresses to my members to confirm who is subscribing but of course they aren't always the same.

At minimum having the Member Name show up in the payment transaction, as well as the bloody useless 'an error has occurred' email I get when it doesn't work (what use is getting an error message email with absolutely NO useful information in it?).

I've completely stopped promoting paid subscriptions largely because it's not worth the effort involved.

Offline xPureEvilx

  • Newbie
  • *
  • Posts: 8
Re: Another paid subscriptions bug?
« Reply #33 on: July 11, 2012, 11:15:50 PM »
So is this topic dead? Iam using SMF 2.0.2 and cant seem to get Paid Subs working.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 73,189
Re: Another paid subscriptions bug?
« Reply #34 on: July 11, 2012, 11:23:14 PM »
I've never had a problem with paid subs to be honest... the big problem with this topic and similar ones is that too many people have never had a problem with it and can't reproduce it either in order to debug it.
No good deed goes unpunished
All helpful urges should be circumvented

Offline Wazza

  • Semi-Newbie
  • *
  • Posts: 98
  • Gender: Male
Re: Another paid subscriptions bug?
« Reply #35 on: July 11, 2012, 11:41:41 PM »
Problem hasn't gone away I've just stopped trying to get it fixed  :'(

In short if you're trying to use reoccurring payments your headed for 'BIG' problems.

I'm using non-reoccurring to fix the problem until a fix becomes available.

The funny thing is now I fully understand reoccurring payments even if this now gets fixed i will just stay with non-reoccurring payments.

This creates less anger from a member if they drift off, as they dont need to stop a reoccurring payment

 :)   

Offline live627

  • Developer
  • SMF Hero
  • *
  • Posts: 5,934
  • Gender: Male
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: Another paid subscriptions bug?
« Reply #36 on: July 12, 2012, 01:52:57 AM »
Quote
In short if you're trying to use reoccurring payments your headed for 'BIG' problems
Oh! So that's why the recurring subscriber on my site last didn't get their group added.

Offline Wazza

  • Semi-Newbie
  • *
  • Posts: 98
  • Gender: Male
Re: Another paid subscriptions bug?
« Reply #37 on: July 12, 2012, 04:11:14 AM »
Quote
In short if you're trying to use reoccurring payments your headed for 'BIG' problems
Oh! So that's why the recurring subscriber on my site last didn't get their group added.


Yes this is what happend to me, plus I had error messages come via emial too  :(
Also this created errors in my site error log

Offline madfiddler

  • Full Member
  • ***
  • Posts: 667
  • Gender: Male
  • Flit Kills Moths
    • madfiddler
Re: Another paid subscriptions bug?
« Reply #38 on: February 10, 2013, 09:31:36 AM »
Sorry to bump, but I've been complaining about this issue for years, and never had a resolve to it. I have the 2005 issue.

What's the latest now?

Thanks,

m

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Another paid subscriptions bug?
« Reply #39 on: February 10, 2013, 11:45:42 AM »
When I do a test subscription with recurring payment, two 'Unknown transaction type' errors are generated. PayPal executes two transactions to set up the subscription:
When you say 'Unknown transaction type' you mean the
Code: [Select]
$txt['paid_unknown_transaction_type'] = 'Unknown Paid Subscriptions transaction type.';asking for confirmation, because that error is triggered in case the gateway cannot handle the payment at all.

I tested the recurring subscriptions in few currencies (USD, EUR, AUD) and when properly configured the aypal account to accept payment in other currencies worked without an issue.

Now I have to wait a couple of days to see if the recurring payment is accepted and processed properly.


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.