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

Creating a PayPal button for RADIUSdesk

  • In this section we assume that we want to offer the users the opportunity to buy data based vouchers.
  • These vouchers will have just a pass-phrase and not a username and password.
  • Log into https://www.sandbox.paypal.com with the merchant account.
  • Go to My AccountProfileSelling Tools.

Be sure to go this route instead of using Merchant Services that has links to the production PayPal website.

  • At the top of the page will be an item called PayPal buttons. Select the Update link next to the item.
  • This will open a My Saved Buttons page with a list of buttons you created. It also allow you to create new buttons.

Three important items

  • When we create a new PayPal button we will choose the BuyNow type.
  • There are three identifiers we will later use to identify the button and what option the user selected during his transaction in order to generate the correct voucher for him.
  • They are:
    • item_name
    • item_number
    • option_selection1
  • These three items will be used in a lookup to get the detail of the voucher that we will generate. See the following snippet of PHP code as a preview.
//From Paypal data 'item_name' (RDVoucher') 'item_number' (rd_v1) option_selection1 ('2Hours')
$config['paypal']['RDVoucher']['rd_v1']['200MB'] = array(
                                                        'activate_on_login' => '1',
                                                        'expire'            => '06/31/2014',
                                                        'precede'           => '',
                                                        'profile_id'        => 7,
                                                        'pwd_length'        => 5,
                                                        'realm_id'          => 34,
                                                        'sel_language'      => '4_4',
                                                        'user_id'           => '44'
                                                    ); 

Adding the button

  • The My Saved Buttons page will have a Related items block to the right. Select the Create new button at the top of that box.
  • See the following screenshots of Step1 and Step3. You do not need to change anything in Step2.
  • Take care when specifying the Item name and Item id since we will use those values in a look-up on the RADIUSdesk server.

Step1

Step3

  • When you are done click the Create button at the bottom of the page.
  • After this it will show you the html text that you will later use in the Dynamic Login Pages to add your button.

Congratulations on creating your first PayPal button!

Next we will move over to the RADIUSdesk server in order to get it configured for PayPal hookup.