Forums

PayPal Litsener

cornelio 12 Mar, 2017
Hi,
PayPal Litsener CF
I followed this guide and various post about this subject, but I still get notified paypal on INVALID, note that instead of the email I receive correctly all variables

custom on email Verified
<?php
echo'<div>$form->data: '.print_r($form->data, true).'</div>';
?>

results mail received:
$form->data: Array ( 
  [option] => com_chronoforms5
  [chronoform] => shop_simple_cart
  [event] => ipn
  [mc_gross] => 0.10
  [protection_eligibility] => Ineligible
  [address_status] => confirmed
  [payer_id] => XAAYVQ94AMTV6
  [address_street] => Via Unit? d'Italia, 5783296
  [payment_date] => 04:15:12 Mar 12, 2017 PDT
  [payment_status] => Completed
  [charset] => windows-1252
  [address_zip] => 80127
  [first_name] => test
  [mc_fee] => 0.10
  [address_country_code] => IT
  [address_name] => ieraphoto
  [notify_version] => 3.8
  [custom] =>
  [payer_status] => verified
  [business] => eliozorro-facilitator-1@tiscali.it
  [address_country] => Italy
  [address_city] => Napoli
  [quantity] => 1
  [verify_sign] => ANAhfQvjC-U8ClXWFXJwsmR-MeJKA6bTIKtXrW-5HVWtyB6tV5fJ1xZJ
  [payer_email] => eliozorro-buyer-1@tiscali.it
  [txn_id] => 686799908J8399321
  [payment_type] => instant
  [payer_business_name] => ieraphoto
  [last_name] => buyer
  [address_state] => Napoli
  [receiver_email] => eliozorro-facilitator-1@tiscali.it
  [payment_fee] =>
  [receiver_id] => JKAAW8JMFYW8A
  [txn_type] => web_accept
  [item_name] => 76,74,
  [mc_currency] => EUR
  [item_number] =>
  [residence_country] => IT
  [test_ipn] => 1
  [transaction_subject] =>
  [payment_gross] =>
  [ipn_track_id] => 770a417ea95c
)

screenshot below
GreyHead 12 Mar, 2017
Hi Cornelio,

I'm sorry but I don't understand what the problem is that you are having?

Bob
cornelio 12 Mar, 2017
Hi Bob,
Paypal Listener on VERIFIED

simply put up with this
<?php
echo'<div>$form->data: '.print_r($form->data, true).'</div>';
?
templeate email I get emails with variables;

if put it on custon (always on Listener VERIFIED) does not work and returns INVALID.

Thank you very much

Cornelio
Max_admin 13 Mar, 2017
Hi Cornelio,

Do you mean that the verified event is not fired ? if yes then please try to do a "live" transaction with $1 to test how this works.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cornelio 13 Mar, 2017
Hi Bob,

many thanks for the answer.

the problem is strange.

-I tried it with the live version (no sandabox) and nothing changes.
-I tried it witht with the old version of Paypal until a few days ago and it worked.

-on the Paypal site we talk about HTTPS use instead of HTTP and $ _POST instead of $ _GET.

Best REgards
Cornelio
Max_admin 13 Mar, 2017
Hi Cornelio,

What do you mean by the "old version of PayPal" ?

The listener hould use https and POST

Your form setup shows an email in the "verified" event, do you receive this email ? or you have an email in the "invalid" ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cornelio 13 Mar, 2017
Hi Bob,

What do you mean by the "old version of PayPal" ?



Paypal a few weeks ago launched a new interface for access to the payment.

The listener hould use https and POST


it seems that in fact taken on each site will be insatllato the SSL cerificate

Your form setup shows an email in the "verified" event, do you receive this email ?



Yes

or you have an email in the "invalid"


No

Thanks a lot

Cornelio
Max_admin 13 Mar, 2017
Hi Cornelio,

If the email in verified is sent then the listener is working fine, where is the problem then ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cornelio 13 Mar, 2017
Hi Bob,

Sorry, I can't express well what I mean.

i try agin:

if I put this script
<?php
echo'<div>$form->data: '.print_r($form->data, true).'</div>';
?>

in the mail template I get the variables.

if I enter the same script in a Custom Code I NOT receive the variables.

Best Regards
Cornelio
Max_admin 13 Mar, 2017
Hi Cornelio,

This is normal and expected, you can receive the variables in the ipn event using custom code, because you are not supposed to access that event using your browser, instead the PayPal service pings it, so you can get the data only using an email or database storage.

For testing purposes you can use an email in the "invalid" and "error" events in the listener, if you do not receive them then your form setup is good.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cornelio 14 Mar, 2017
Hi Max,

For testing purposes you can use an email in the "invalid" and "error" events in the listener, if you do not receive them then your form setup is good.


The Listener is always on INVALID.
1) email in the "invalid" i get :
Array
(
    [option] => com_chronoforms5
    [chronoform] => shop_simple_cart
    [event] => ipn
)

the problem is whereas the variables not work with no solution

Best regards
Cornelio
GreyHead 14 Mar, 2017
Hi cornelio ,

I cannot work out what your question is here???

As far as I know the HTTPS requirement is currently only *required* for the PayPal Sandbox, not on the live site. You should though make sure that you have a certificate ready for when they do change.

I can't tell from your posts what data you are getting where. You will not 'see' any output from the PayPal Listener except in the emails - the transaction does not take place in the browser. That is why adding your code in a Custom Code action does nothing.

Bob
cornelio 14 Mar, 2017
Hi Bob,

the transaction does not take place in the browser



OK. then to recall the variable you must first save it to the database? how do this?

Thanks a lot

Cornelio
Max_admin 14 Mar, 2017
Hi Cornelio,

You do not have to save the data, but its a common practice to store the order data, you can do this using "db save" action in the "verified" event of the paypal listener.

The only way to test this then is to make a purchase using the sandbox or the live modes.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 14 Mar, 2017
Hi Cornelio,

I always suggest that you save the data when the fom is first submitted, before the PayPal action, and add a record identifier to the data you send to PayPal.

Then in the PayPal Listener you can re-load the saved data if you need it. (PayPal also sends back the date that you sent them plus more of their own.) When the payment succeeds I would update the same record to show that.

Bob
cornelio 15 Mar, 2017
Hi Bob,

sorry, but honestly I'm confused.
I understand what you say, but how do I seem contradictory:

You do not have to save the data, but its a common practice to store the order data, you can do this using "db save" action in the "verified" event of the paypal listener.



... and add a record identifier to the data you send to PayPal.



OK this record identifier I'll compare it to retrieve something from PayPal is the real problem, how do?

I must first save the data from Paypal on db and then call them back.?

thank you very much.

Cornelio
GreyHead 15 Mar, 2017
Hi Cornelio,

You have a record of the purchase information from when the form is first saved. You save this and then you need some way to identify this record so that you can match it up again later. You can use the record ID from the database table - ChronoForms adds that to the form data after the DB Save; or you can use a more secure random identifier if you need to. If you include this value in the data you send to PayPal as - for example, the invoice number - then PayPal will include that in the data sent to the PayPal Listener and you can use it to read the correct record from the database table.

Bob
This topic is locked and no more replies can be posted.