Hello
I have built a form using Paypal redirect and now I would like to purchase the plugin so that I can use it live.
i have a few questions:
1) I did not manage to get the Listener to work - in the ipn event I put a DB Save and some emaling (one inside the DB event and an email after the Listener) which all work fine but the Listener does not send any emails.
- I read on the forum in one place that the Listener does not work with Sandbox? Is this correct?
2) Can you explain what the Listener does and why it is important to have it?
3) The redirect does not 'redirect' automatically but I have to click on the link on the paypal payment confirmation page first. Can this be adjusted in the plugin?
Thank you
Amelia
I have built a form using Paypal redirect and now I would like to purchase the plugin so that I can use it live.
i have a few questions:
1) I did not manage to get the Listener to work - in the ipn event I put a DB Save and some emaling (one inside the DB event and an email after the Listener) which all work fine but the Listener does not send any emails.
- I read on the forum in one place that the Listener does not work with Sandbox? Is this correct?
2) Can you explain what the Listener does and why it is important to have it?
3) The redirect does not 'redirect' automatically but I have to click on the link on the paypal payment confirmation page first. Can this be adjusted in the plugin?
Thank you
Amelia
Hi Amelia,
What do you actually need to do with PayPal?
If you are taking simple payments then ReDirection may be enough.
You only need the PayPal Listener if you are using IPN (Instant Payment Notification) or a similar PayPal feature. IPN checks back with your site first to confirm the transaction is valid and secondly to confirm if it has succeeded or not.
The PayPal Listener action goes into a separate form event which you identify in the notify_url sent to PayPal.
The action does not send any emails by itself - but you can add email actions in one or more of the events or after the action to report results.
There is a possible problem with using the SandBox to test the Listener in that some of the expected information from PayPal is missing in that case. It's not usually a serious problem.
As far as I recall, PayPal does an automatic redirection to the return_url (not the same as the notify_url); there may be a PayPal setting that changes that, I don't think there is anything in ChronoForms.
Bob
What do you actually need to do with PayPal?
If you are taking simple payments then ReDirection may be enough.
You only need the PayPal Listener if you are using IPN (Instant Payment Notification) or a similar PayPal feature. IPN checks back with your site first to confirm the transaction is valid and secondly to confirm if it has succeeded or not.
The PayPal Listener action goes into a separate form event which you identify in the notify_url sent to PayPal.
The action does not send any emails by itself - but you can add email actions in one or more of the events or after the action to report results.
There is a possible problem with using the SandBox to test the Listener in that some of the expected information from PayPal is missing in that case. It's not usually a serious problem.
As far as I recall, PayPal does an automatic redirection to the return_url (not the same as the notify_url); there may be a PayPal setting that changes that, I don't think there is anything in ChronoForms.
Bob
Hello Bob
Thank you for your answer.
I have a form in which a selection is made, on submit the user is redirected (using the Paypal redirect event) to Paypal to pay for the selected item. I set both notify_url and redirect_url (each to different urls) and I have an ipn event on the same form. Paypal does send an ipn to my form and inside the ipn event of the form I use an DB Read, and some php code to update some info in my database (e.g., the txn_id is added to a table against that sale). In the same event I send an email to the buyer with an attachment corresponding to the selection made (I use a custom field send and received from paypal for the sale_id).
This all works at the moment. I am thinking that I do not check at the moment if the payment_status is confirmed but I could do that with an event_switcher. I had the feeling that Paypal Listener does a bit more than just checks the transaction status but I was not sure what.
So how do I combine the DB Read and php code to update the table in my database and the emailing with the Listener? I understand now that the Listener not only checks for the payment status but also checks that the payment is valid in the sense that was initiated from my end? Is this right?
When you say that "The PayPal Listener action goes into a separate form event which you identify in the notify_url sent to PayPal."
do you mean that it should be added to another form? At the moment I have it in the same form in the ipn event?
Thank you
Kind regards
Amelia
Thank you for your answer.
I have a form in which a selection is made, on submit the user is redirected (using the Paypal redirect event) to Paypal to pay for the selected item. I set both notify_url and redirect_url (each to different urls) and I have an ipn event on the same form. Paypal does send an ipn to my form and inside the ipn event of the form I use an DB Read, and some php code to update some info in my database (e.g., the txn_id is added to a table against that sale). In the same event I send an email to the buyer with an attachment corresponding to the selection made (I use a custom field send and received from paypal for the sale_id).
This all works at the moment. I am thinking that I do not check at the moment if the payment_status is confirmed but I could do that with an event_switcher. I had the feeling that Paypal Listener does a bit more than just checks the transaction status but I was not sure what.
So how do I combine the DB Read and php code to update the table in my database and the emailing with the Listener? I understand now that the Listener not only checks for the payment status but also checks that the payment is valid in the sense that was initiated from my end? Is this right?
When you say that "The PayPal Listener action goes into a separate form event which you identify in the notify_url sent to PayPal."
do you mean that it should be added to another form? At the moment I have it in the same form in the ipn event?
Thank you
Kind regards
Amelia
Hi Amelia,
Your setup is OK - sorry if I was misleading about where the IPN event is.
Put simply, an IPN transaction with PayPal has several steps:
+ The User goes to PayPal and clicks 'Pay'
+ PayPal sends the transaction info back to the notify_url and says 'Is this correct?'
+ The IPN event says, yes that's OK*
+ PayPal confirms (or not) the payment and shows the User that info
+ PayPal sends the info back to the notify_url again with the payment status.
+ The IPN event sets one of the events depending on the status and processing any other actions in the event continues.
I would suggest that you add a DB Save action after the PayPal listener and save (or rather update) the transaction record. The use an Event Switcher to check the status and take whatever other actions you need.
Bob
* In an ideal setup the PayPal Listener action would read the data back from the table and check to see that it is the same as PayPal's data - this version doesn't do that, it just confirms.
Your setup is OK - sorry if I was misleading about where the IPN event is.
Put simply, an IPN transaction with PayPal has several steps:
+ The User goes to PayPal and clicks 'Pay'
+ PayPal sends the transaction info back to the notify_url and says 'Is this correct?'
+ The IPN event says, yes that's OK*
+ PayPal confirms (or not) the payment and shows the User that info
+ PayPal sends the info back to the notify_url again with the payment status.
+ The IPN event sets one of the events depending on the status and processing any other actions in the event continues.
I would suggest that you add a DB Save action after the PayPal listener and save (or rather update) the transaction record. The use an Event Switcher to check the status and take whatever other actions you need.
Bob
* In an ideal setup the PayPal Listener action would read the data back from the table and check to see that it is the same as PayPal's data - this version doesn't do that, it just confirms.
Hello Bob
I think that I am beginning to understand please allow me to clarify a bit further. Is my understanding of the way things work correct below:
1) I must have a Paypal Listener in the ipn event so that I make sure the communication with Paypal is genuine (e.g., originated from my site)
2) Paypal listener should have a DB read inside it which simply reads from the same table in which the data was saved at the submit - this same data is simply sent back to Paypal for validation
3) all other things I want done in the ipn event (like emailing and updating the tables) should come after the Listener
4) if the listener does not agree with paypal during their communication back and forth none of the tasks I added after the listener get done
5) a related issue in the demo for paypal redirect the notify_url is not set: does this form assume that the notify_url is set at the paypal end?
Thank you
Amelia
I think that I am beginning to understand please allow me to clarify a bit further. Is my understanding of the way things work correct below:
1) I must have a Paypal Listener in the ipn event so that I make sure the communication with Paypal is genuine (e.g., originated from my site)
2) Paypal listener should have a DB read inside it which simply reads from the same table in which the data was saved at the submit - this same data is simply sent back to Paypal for validation
3) all other things I want done in the ipn event (like emailing and updating the tables) should come after the Listener
4) if the listener does not agree with paypal during their communication back and forth none of the tasks I added after the listener get done
5) a related issue in the demo for paypal redirect the notify_url is not set: does this form assume that the notify_url is set at the paypal end?
Thank you
Amelia
Hi Amelia,
1) Yes
2) No - the PayPal Listener action just confirms the transaction, you don't need to do anything.
3) Yes, you can add actions in the On Invalid and On Error boxes if you need to. But the same information is available afterwards.
4) No, all of the later actions will be run unless something - like an Event Switcher with a Show Stopper - is done to stop them
5) You can set the notify_url in your PayPal account but that will only work with one form. Better to set it in the Extra Params box of the PayPal ReDirect action, then you can make it specific to that form.
Bob
1) Yes
2) No - the PayPal Listener action just confirms the transaction, you don't need to do anything.
3) Yes, you can add actions in the On Invalid and On Error boxes if you need to. But the same information is available afterwards.
4) No, all of the later actions will be run unless something - like an Event Switcher with a Show Stopper - is done to stop them
5) You can set the notify_url in your PayPal account but that will only work with one form. Better to set it in the Extra Params box of the PayPal ReDirect action, then you can make it specific to that form.
Bob
Hello Bob
ok so on 3) What you are saying is that I should not put anything in the Listener in the On Success part but put everything I want done on Success after the listener. In this case is the paypal listener actually returning any value which I can use in an event switcher after the listener?
Many thanks for bearing with me on this.
Amelia
ok so on 3) What you are saying is that I should not put anything in the Listener in the On Success part but put everything I want done on Success after the listener. In this case is the paypal listener actually returning any value which I can use in an event switcher after the listener?
Many thanks for bearing with me on this.
Amelia
Hi Amelia,
I generally advise against using the On Success events except in rare cases. Generally it's better to keep the main flow of actions in the parent event. By all means use the pink events if they are helpful.
After the Listener completes you will have all the data from PayPal in the $form->data[''] array. Here's an example from another forum post
Bob
I generally advise against using the On Success events except in rare cases. Generally it's better to keep the main flow of actions in the parent event. By all means use the pink events if they are helpful.
After the Listener completes you will have all the data from PayPal in the $form->data[''] array. Here's an example from another forum post
$form->data: Array (
[option] => com_chronoforms5
[chronoform] => ambiente-paypal
[event] => ipn
// after this is data from PayPal
[payment_type] => instant
[payment_date] => Mon Nov 16 2015 13:58:01 GMT-0200 (BRST)
[payment_status] => Pending
[address_status] => confirmed
[payer_status] => verified
[first_name] => John
[last_name] => Smith
[payer_email] => buyer @[at] paypalsandbox
[dot] com
[payer_id] => TESTBUYERID01
[address_name] => John Smith
[address_country] => United States
[address_country_code] => US
[address_zip] => 95131
[address_state] => CA
[address_city] => San Jose
[address_street] => 123 any street
[business] => seller @[at] paypalsandbox
[dot] com
[receiver_email] => seller @[at] paypalsandbox
[dot] com
[receiver_id] => seller @[at] paypalsandbox
[dot] com
[residence_country] => US
[item_name] => something
[item_number] => AK-1234
[quantity] => 1
[shipping] => 3.04
[tax] => 2.02
[mc_currency] => USD
[mc_fee] => 0.44
[mc_gross] => 12.34
[mc_gross1] => 12.34
[txn_type] => web_accept
[txn_id] => 632442010
[notify_version] => 2.1
[custom] => xyz123
[invoice] => abc1234
[test_ipn] => 1
[verify_sign] => AFcWxV21C7fd0v3bYYYRCpSSRl31A04A-Z.5BLCxY4m6rSepyjbM--8Q
[ip_address] => 173.999.999.33
)
What you will need to decide the next steps is the value of the payment_status entry.
Bob
This topic is locked and no more replies can be posted.