Paypal update error in case of unconfirmed address

Status
Not open for further replies.

lcollong

FabriKant d'applications web
Hi,

Using Paypal plugin, if using a confirmed address or no address at all (virtual goods) during the payment process : everything is fine (top part of the fabrik log in the sreenshot). But if you give an unconfirmed address (although this an non current situation ! May be impossible if not sandbox ?), it seems that the processed message are reversed (sse bottom part of the screenshot). The "completed" message is followed by a "form.paypal.ipn." message in which there is the following SQL :

Code:
UPDATE fk_factures
SET `invoice_status` = '2',`IPN_Txn_Id` = '',`IPN_payment` = '',`IPN_status` = '',`IPN_address` = ' -     '
WHERE fk_factures.id = '5'
 IPN custom function = 
 IPN custom transaction function =

All the fields are empty. Where as the previous IPN message (completed) has the following sql :

Code:
UPDATE fk_factures
SET `invoice_status` = '2',`IPN_Txn_Id` = 'xxxxxxxxxCD946201V',`IPN_payment` = '321.72',`IPN_status` = 'Completed',`IPN_address` = 'unconfirmed - Av. de la Pelouse, 87648672 Mayet 75002 Alsace Paris FR'
WHERE fk_factures.id = '5'
 IPN custom function = 
 IPN custom transaction function =

Thus the data stored in the fabrik tables are erased some seconds after being correctly set....

It's so much a corner case that I don't care if there is no solution to solve it but, perhaps this problem could reveal some logic error in the IPN message back treatment ?
 
Reopening this one. It seems to be not so much a "corner case". If I use the subscription branch for a payment, everything went well on the paypal view checking the "no delivery address" option (virtual goods). But the database is wrongly updated. The log shows 4 successive message :
1- fabrik.paypal.onAfterProcess
2- form.paypal.ipn.Completed - txn_type = subscr_payment (not on first line) - with the following SQL :
Code:
UPDATE fk_factures
SET `invoice_status` = '2',`IPN_Txn_Id` = '1R0zzzzzzzzzz741U',`IPN_payment` = '8.00',`IPN_status` = 'Completed',`IPN_address` = 'unconfirmed - Av. de la Pelouse, 87648672 Mayet 75002 Alsace Paris FR'
WHERE fk_factures.id = '11'
IPN custom function =
IPN custom transaction function =
3- form.paypal.ipn. - txn_type = subscr_eot - with the following SQL :
Code:
UPDATE fk_factures
SET `invoice_status` = '2',`IPN_Txn_Id` = '',`IPN_payment` = '',`IPN_status` = '',`IPN_address` = ' -    '
WHERE fk_factures.id = '11'
IPN custom function =
IPN custom transaction function =
4- form.paypal.ipn. - txn_type = subscr_signup - with the following SQL :

Code:
UPDATE fk_factures
SET `invoice_status` = '2',`IPN_Txn_Id` = '',`IPN_payment` = '',`IPN_status` = '',`IPN_address` = 'unconfirmed - Av. de la Pelouse, 87648672 Mayet 75002 Alsace Paris FR'
WHERE fk_factures.id = '11'
IPN custom function =
IPN custom transaction function =

The test you've added seems not being triggered
 
I'm not sure to understand the logic of this test. The first part should result to a boolean and it is compared to a string ? :
if (!empty($txn_id) != '' && !empty($payment_status))
 
I mean : !empty($txn_id) != ''
empty($txn_id) should return a boolean so the !='' test is expected to return.... always true ?
 
No matter, I made a brand new "update everything" from github and now the payment seems to "hang".
The paypal "thing" goes well, I pay and I return to the site return url. Fine. I'm notified of both end (buyer/seller) of the payment through the paypal console which means that Paypal is "happy". But the row is never updated. And the log shows this :
1- an immediate record saying "fabrik.paypal.onAfterProcess" with a lot of parameters which seem to be good.
2- after around one minute a record saying "fabrik.ipn.start" with numerous data which seems to be good including a
"payment_status":"Completed"
3 - apparently the same thing is triggered several times increasing the delay between each of them. I have currently 9 of them.
4 It never shows the form.paypal.ipn.Completed record as before.
 
any errors in you php logs?
It sounds like the IPN code is generating a page error - so Paypal thinks it hasn't fully sent the IPN request
 
I found these. Could it be related ?

Code:
PHP message: PHP Notice:  Undefined variable: header in /var/www/dev.xxxxx.com/www/plugins/fabrik_form/paypal/paypal.php on line 648
PHP message: PHP Fatal error:  Call to a member function getCfg() on a non-object in /var/www/dev.xxxxxx.com/www/plugins/fabrik_form/paypal/scripts/paypal_ipn_test.php on line 64" while reading response header from upstream, client: 111.222.333.444, server: www.dev.xxxxxxx.com, request: "POST //index.php?option=com_fabrik&c=plugin&task=plugin.pluginAjax&formid=10&g=form&plugin=paypal&method=ipn&renderOrder=0 HTTP/1.0", upstream: "fastcgi://127.0.0.1:9001", host: "www.dev.xxxxxxx.com"
 
Shame on me ! :oops: I made some test with the IPN scripts and forgot to deselect it the plugin parameters.My script is probably horribly buggy but for now I don't need it apparently. It's now back working nicely.... Closing this one definitively (I hope :)) Thanks.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top