RADIUSdesk WiFi Hotspot Manager and GUI for FreeRADIUS
MESHdesk Streamlined Mesh Controller

PayPal hookup - Doing the first tests

  • In order to avoid being overwhelmed by everything we will do initial testing to confirm the buttons and the IPN function work as intended.
  • Then we will configure RADIUSdesk to be able to auto-create the vouchers.
  • Finally we will test everything as a whole.
  • On this page we will only discuss the testing of the PayPal buttons and the IPN function.

My first purchase

Monitor the purchase

  • Log into the RADIUSdesk server on two terminals.
  • On the one issue the following command to gain a watch on the access log of Nginx
sudo su
tail -f /var/log/nginx/access.log
  • On the other issue the following command to gain a watch on the error log of the RADIUSdesk CakePHP application.
tail -f /usr/share/nginx/html/cake2/rd_cake/tmp/logs/error.log

Do the purchase

  • Go to the Desktop Login page and select an item from the PayPal button.
  • Click on the Buy Now button to be redirected to the PayPal sandbox to make a purchase.
  • Log in as the buyer you created at the start of this exercise and complete the transaction.

Result of the purchase

  • If all works correct you will see the following.
  • The POST action from PayPal's server - - [04/Oct/2014:19:42:19 +0800] "POST /cake2/rd_cake/fin_paypal_transactions/paypal_ipn.json HTTP/1.0" 200 20137 "-" "PayPal IPN ( https://www.paypal.com/ipn )"
  • The CakePHP app will log an error since it will try to look-up a voucher definition which does not exists yet. That is fine we are only concerned now to confirm it works and does report an error.
2014-10-04 19:42:19 Error: Failed to locate PayPal config item for RDVoucher / rd_v1 /   please do manual intervention
  • If this does not work confirm that you:
    • Activated the IPN function.
    • Specified the correct IPN URL in the button's definition.
  • Repeat this also with the Mobile Login page to confirm that PayPal button also work as intended.

What does RADIUSdesk say about all this?

  • RADIUSdesk makes it super easy to keep track of all these transactions. Go to MenuFinancesPaypal to open up the PayPal applet.
  • The results of your transactions will be listed there.

  • You will notice that there are no voucher specified yet. This is because we have to define some voucher definitions that can be used to generate the vouchers during the time that the IPN transaction takes place.
  • We will do this next.