News:

Wondering if this will always be free?  See why free is better.

Main Menu

no paid subscriptions possible in SMF?

Started by paq, March 25, 2015, 12:18:51 PM

Previous topic - Next topic

paq

We've tried many many times now to set up 0,01 paid subscriptions in 2.1. All seems to be working fine, payments arrive, the users is being redirected back to the board, but the profile is not automatically updated.
Even when I make a complete fresh install, on a new database, it will have the exact same outcome.

What could be failing here?

Kindred

lots of things could be failing -- you don't really provide enough information to debug....
Сл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."

paq

On the 2.1 install I 'manage' to get error e-mails back from the forum stating an unknown transaction type was used.On the subscriptions admin panel however, it claims it has a few fulfilled subscriptions, but when I click the subscription, there are no subscribers. Payments are processed by paypal though.

on 2.0 this all works pretty much the same, only here subscriptions are handled as expected, and subscribers automatically are transferred to the given group, and an overview of the transaction with the purchased subscription is emailed to the admin.

Then I tried an updated version 2.0 > 2.1... same issue

we've double checked the paypal settings a million times, but can't figure out what it is that might go wrong here.

lc62003


Deaks

~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

paq

yes
all related to subscription.php

Fouttype: Errors resulting from paid subscriptions, which can include notification of payment failures.
Onbekend tranactietype.
transaction_subject:
txn_type: web_accept
payment_date: 08:12:46 Mar 25, 2015 PDT
last_name: xxxxx
residence_country: NL
pending_reason: unilateral
item_name: test Abonnement
payment_gross:
mc_currency: EUR
business: xxxxxx
payment_type: instant
protection_eligibility: Ineligible
verify_sign: AFQ83kqt8xk0yYDtaN-N-.t9hFpjANEJVZE3YUmZ83PRaUa5h.77scA9
payer_status: verified
tax: 0.00
payer_email: xxxxxxx
txn_id: 9VB014800S5819906
quantity: 1
receiver_email: xxxxxx
first_name: xxx
payer_id: E2BTTQVGRQJ38
item_number: 2+1615
handling_amount: 0.00
payment_status: Pending
shipping: 0.00
mc_gross: 0.01
custom:
charset: windows-1252
notify_version: 3.8
ipn_track_id: xxxxxxxx

Sir Osis of Liver

Can you pm the complete (unedited) error log?  payment_status should not be 'Pending', that may be something on PayPal's end.  Will be back on later, and have a closer look.

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

                                     - R. Waters

Sir Osis of Liver

Subscription will fail if payment_status is 'Pending', it must be 'Completed' for subscription to activate, as per this -

Subscriptions-PayPal.php



public function isPayment()
{
if ($_POST['payment_status'] === 'Completed' && $_POST['txn_type'] === 'web_accept')
return true;
else
return false;
}



Same in 2.0 and 2.1.  For reasons unknown, PayPal is returning payment_status as 'Pending', which indicates the payment wasn't completed successfully on their end.  Paid Subs is doing what it's supposed to do, it does not activate the subscription and errors out.

Also see payment_gross is blank, and mc_gross: 0.01.  If this is a test subscription, PayPal has a minimum transaction of $0.10USD.  You may have configured it below the minimum.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

paq

OK Thanks

I will look that up.
I didn't set this up as being an (admin) test payment/subscription, we did, however, made it 1 cent transactions. Which succeed perfectly on 2.0.

I will send you the PM later.



paq

right...
1. I set it up to a 0,15 transaction.
2. payment is verified, however the same error occurs.
3. Directly after having the payment made, instead of automatically linking back to the board, paypal shows a link stating "go back to [[email protected] account]"
4. If I click this, the transaction seems to finish and I get an automated link back to the board on the actual next page.
5. Then the error follows by e-mail again (same as in this log, but just stating unknown blbala).

In the IPN log on paypal, the transaction is visible though.

To me it seems that step 3 is the issue. How come paypal is trying to send me back to the receivers paypal address?

d65aea696fc7f0c877edbb0aacb01659
Fouttype: Errors resulting from paid subscriptions, which can include notification of payment failures.
Onbekend transactietype.
transaction_subject:
payment_date: 01:14:36 Mar 26, 2015 PDT
txn_type: web_accept
last_name: xxxxxx
residence_country: NL
item_name: test
payment_gross:
mc_currency: EUR
business: paypal@xxxxxx
payment_type: instant
protection_eligibility: Ineligible
verify_sign: Acp9sEM7MAdfBbGez1P6Ikf8i3dJABwhmYZPD-uLm1boYM38zLuAp0K7
payer_status: verified
tax: 0.00
payer_email: [email protected]
txn_id: 08X83027VW2697046
quantity: 1
receiver_email: paypal@xxxxxx
first_name: xxx
payer_id: E2BTTQVGRQJ38
receiver_id: T84SU8JD5MMVJ
item_number: 1+1614
handling_amount: 0.00
payment_status: Completed
payment_fee:
mc_fee: 0.15
shipping: 0.00
mc_gross: 0.15
custom:
charset: windows-1252
notify_version: 3.8
ipn_track_id: ec742ba0517fb

paq

OK update :)

I now uploaded the 2.0.9 versions of Subscriptions.php and Subs_Paypal.php to 2.1
All though the paypal interface shows (in my opinion) not completely correct information, it seems to suffice in the process sending the IPN back to the board.
The user is "upgraded" to the desired members group.

There is no error log.
The user received the correct (new) id_group
The subscription log in the database went to pending 0, status 1

BUT
Despite the admin panel showing an active subscriber, the actual subscribers list remains empty.




margarett

Quote from: paq on March 26, 2015, 08:43:22 AM
I now uploaded the 2.0.9 versions of Subscriptions.php and Subs_Paypal.php to 2.1
That is really a bad idea :P There were code changes from 2.0.x to 2.1 which should cause some problems...

We need to further investigate the current status of paid subs in 2.1...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

paq

#12
I understand, but it might give us some idea of where the problem might lay.
and.. it kinda works now ;) Whereas with the out of the box 2.1 files, it doesn't  (at least not on my board)



edit:
I narrowed it down to the paypal file only.
The fresh install /subscriptions.php file works.
For now it is just the older /sources/Subscriptions-paypal.php  (version 2.0.3) that is being used.

Still not showing any subscribers in my list though. (/sources/ManagePaid.php?)

paq

Well, I copied the arrays from the 2.0.9 /Sources/ManagePaid.php (version 2.0.3) to show subscribed users, and this solves my problem  8)

Not sure whether I should mark this topic as being solved, for this took quite some hours of searching, and -clearly- using unintended code in order to get it up and running.

Sir Osis of Liver

What a mess.  Plugged your PP account into my 2.1 test install.  Payment is successful, subscription fails with error, don't know why.

Here's the problem in ManagePaid.php -



'items_per_page' => $modSettings['defaultMaxListItems'],   



$modSettings is not globalized in function ViewSubscribedUsers().  Have to add it here -



function ViewSubscribedUsers()
{
global $context, $txt, $scripturl, $smcFunc, $sourcedir, $modSettings;



That's not causing sub to fail.  Will work on that.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Confirmed subscription activates in 2.1 with 2.0.9 Subscriptions-PayPal.php, not with 2.1 file.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

paq

Quote from: Krash on March 26, 2015, 03:19:57 PM
What a mess.  Plugged your PP account into my 2.1 test install.  Payment is successful, subscription fails with error, don't know why.

Here's the problem in ManagePaid.php -



'items_per_page' => $modSettings['defaultMaxListItems'],   



$modSettings is not globalized in function ViewSubscribedUsers().  Have to add it here -



function ViewSubscribedUsers()
{
global $context, $txt, $scripturl, $smcFunc, $sourcedir, $modSettings;



That's not causing sub to fail.  Will work on that.
aaaah right... the Sourcedir.
Added that > works  ;D


Quote from: Krash on March 26, 2015, 04:01:49 PM
Confirmed subscription activates in 2.1 with 2.0.9 Subscriptions-PayPal.php, not with 2.1 file.

8)

Sir Osis of Liver

I know where the problem is in Subscriptions-PayPal.php, just haven't picked it out.  Will have another go tonight.

paq, am using your PP account for test purposes, have to pay with credit card if I use my own.  Buy yourself something nice. ;)
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

paq

gheghege thanks :D

the thing is... subscriptions are 1 cent, paypal costs are 35 cents  :laugh:
So I end up with 0,00

Sir Osis of Liver

Ok, here's the fix -

Subscriptions-PayPal.php



public function isValid()
{
global $modSettings;

// Has the user set up an email address?

if (empty($modSettings['paypal_email']))

// if ((empty($modSettings['paidsubs_test']) && empty($modSettings['paypal_email'])) || empty($modSettings['paypal_sandbox_email']))

return false;


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

                                     - R. Waters

Advertisement: