PisoWiFi Voucher Purchase via EWallets

Documentation version 1.0


Introduction


First of all, Thank you so much for giving an interest to this project. You are awesome!
This documentation will enable your vendo portal to have a feature wherein your customer can purchase internet voucher codes via EWallets (GCash, Maya, Grab, ShopeePay and more).

Fees

As much as I want it give this for free, keeping this project running have expenses (e.g Server Maintenance, SSLs certificate, domains, Payment Gateway solutions, VPN etc.). With this in mind, we would need to collect small fees. Below are the details.
  1. 250PhP registration fee
  2. 5% for every successful voucher purchase. Example: If your use purchase a 100pesos voucher via EWallet, you will be creadited 95php on your gcash account
  3. 12PhP Fix Transfer fee from our account to your GCash account
The payments will be automatically transferred to you once you reached the minimum disbursement amount of 500PhP.

Purchase Portal Key


Step 1: Register to WiFree Network

Go to https://payments.wifree.network/register.html to register.
Once registered, head over to WiFree Network login page here.


Step 2: Buy Portal Key

Navigate to Piso WiFi > ECash Portals, then click + NEW VENDO button.

  1. Click Buy Portal Key button.
  2. Input your GCash Number
  3. Select Vendo System
    • * MikRotik - Compatible with any type of voucher system under MikRotik (E.g Mikhmon, JuanFi, etc.). This is recommended for all WiFi system under mikrotik.
    • * JuanFi - For JuanFi specific deployment. If you're using a combination of Mikhmon and JuanFi, please select mikrotik on the list instead.
    • * KiTiFi - For Kitifi vendo system
  4. then click Proceed Payment
Note: Make sure that you will encode a valid GCash number when generating the checkout link. The submitted GCash number will be used as a receiver for disbursement. A checkout link should be generated after submitting the command above.


Step 3: Proceed with Payment

You will be redirected to checkout page once you click the generated checkout link. You may select any EWallet or Bank to proceed with the purchase, just follow to on-screen instruction after selecting the preferred channel.


Step 4: Generating your portal keys

Yup, we need you to wait.

You will be redirected to success page after payment. System is now processing your portal keys along with VPN account. It would just take at least more or less than 5 minutes to generate your credentials. Keep the browser open and refresh every 5 minutes until you can see your account credentials


Step 5: Adding your credentials to Dashboard

Copy the payment reference number then head back to your dashboard.

  1. Click + NEW VENDO button.
  2. Paste the Payment reference number
  3. then click Submit

Congratulations! You've successfully bought a portal key and added it to your dashboard account. You may now proceed to Getting Started page



Getting Started

Step 1: Adding SSTP Client account

Open your Mikrotik via Winbox
  1. Navigate to Interface
  2. Click the + button
  3. Click SSTP Client
on Dial out tab, input the following credentials
  • - Connect To: vpn.wifree.network
  • - Port: 444
  • - User: Your SSTP username
  • - Password: Your SSTP Password
After encoding the credentials, click Apply button.

Step 2: Check the SSTP Client Status

Once done with Step 1, navigate to Status Tab
  1. You should see Enable on lower right
  2. Also indicated that SSTP client is running
  3. The status is Connected
  4. Local and Remote IP should have values populated

Step 3: Add entries on Walled Garden IP List

You just need to copy the code below, then paste it on your Mikrotik Terminal
/ip firewall address-list
add address=gcash.com list=reminder-allow-site
add address=assets.xendit.co list=reminder-allow-site
add address=checkout-ui-gateway.xendit.co list=reminder-allow-site
add address=payments.gcash.com list=reminder-allow-site
add address=xendit.co list=reminder-allow-site
add address=maya.ph list=reminder-allow-site
add address=pg-sandbox.paymaya.com list=reminder-allow-site
add address=api.paymaya.com list=reminder-allow-site
add address=ewallet-service-live.xendit.co list=reminder-allow-site
add address=wifree.network list=reminder-allow-site
add address=gw.alipayobjects.com list=reminder-allow-site
add address=irisk-sea.alipay.com list=reminder-allow-site
add address=grabpay-connector-live.xendit.co list=reminder-allow-site
add address=weblogin.grab.com list=reminder-allow-site
add address=partner-api.grab.com list=reminder-allow-site
add address=grab.com list=reminder-allow-site
add address=pay.grab.com list=reminder-allow-site
add address=app.appsflyer.com list=reminder-allow-site
add address=shopee.ph list=reminder-allow-site
add address=wsa.wallet.airpay.com.ph list=reminder-allow-site
add address=connect.paymaya.com list=reminder-allow-site
add address=digicert.com list=reminder-allow-site
add address=checkout.xendit.co list=reminder-allow-site
add address=mynt.xyz list=reminder-allow-site
add address=mgs-gw.paas.mynt.xyz list=reminder-allow-site
add address=traefik-public.ap-southeast-1.tidnex.com list=reminder-allow-site
add address=paas.mynt.xyz list=reminder-allow-site
add address=www.recaptcha.com list=reminder-allow-site
add address=js.xendit.co list=reminder-allow-site
add address=xnd-merchant-logos.s3.amazonaws.com list=reminder-allow-site
add address=cloudfront.net list=reminder-allow-site
add address=snowflow-collector.iluma.ai list=reminder-allow-site
add address=beacons.gvt2.com list=reminder-allow-site
add address=beacons.gcp.gvt2.com list=reminder-allow-site
add address=discover-pa.googleapis.com list=reminder-allow-site
add address=fonts.googleapis.com list=reminder-allow-site
add address=www.googletagmanager.com list=reminder-allow-site
add address=content-autofill.googleapis.com list=reminder-allow-site
add address=payments.wifree.network list=reminder-allow-site
add address=challenges.cloudflare.com list=reminder-allow-site
add address=cnd.growthbook.io list=reminder-allow-site
add address=iluma.ai list=reminder-allow-site
add address=datadoghq-browser-agent.com list=reminder-allow-site
add address=cdn.jsdelivr.net list=reminder-allow-site
add address=client4.google.com list=reminder-allow-site
add address=www.gstatic.com list=reminder-allow-site
add address=snowplow-collector.iluma.ai list=reminder-allow-site
add address=cdn.growthbook.io list=reminder-allow-site
add address=gcash-api.pulseid.com list=reminder-allow-site
add address=mss.paas.mynt.xyz list=reminder-allow-site
add address=api.mynt.xyz list=reminder-allow-site
add address=login.mynt.xyz list=reminder-allow-site
add address=customer-segment-api.mynt.xyz list=reminder-allow-site
add address=mdap.paas.mynt.xyz list=reminder-allow-site
add address=cdnjs.cloudflare.com list=reminder-allow-site
add address=xqd9eal.x.incapdns.net list=reminder-allow-site
add address=rum-ingest.us1.signalfx.com list=reminder-allow-site
add address=110.75.232.97 list=reminder-allow-site
add address=110.75.232.98 list=reminder-allow-site
add address=110.75.232.99 list=reminder-allow-site
add address=110.75.232.100 list=reminder-allow-site
add address=xen.to list=reminder-allow-site
add address=18.138.78.193 list=reminder-allow-site
add address=3.0.107.195 list=reminder-allow-site
add address=3.1.78.74 list=reminder-allow-site
add address=e9816.cj.akamaiedge.net list=reminder-allow-site
add address=104.67.185.229 list=reminder-allow-site
add address="ab448ad13c5be11eab89b06680ff93a5-46768361.ap-southeast-1.elb.amazonaws.com" list=reminder-allow-site
add address=stats.g.doubleclick.net list=reminder-allow-site
add address=www.google-analytics.com list=reminder-allow-site
add address=cloudflareinsights.com list=reminder-allow-site
add address=d39ewjhej4wmka.cloudfront.net list=reminder-allow-site
add address=cdnj.cloudflare.com list=reminder-allow-site
add address=api.xendit.co list=reminder-allow-site
add address=payments-web-assets.maya.ph list=reminder-allow-site
add address=www.digicert.com list=reminder-allow-site
add address=www.xendit.co list=reminder-allow-site
add address=www.google-analytics.com list=reminder-allow-site
add address=9.10.0.0/18 list=reminder-allow-site
add address=mobilegw.alipay.com list=reminder-allow-site
add address=m-gcash-com.s3.ap-southeast-1.amazonaws.com list=reminder-allow-site
add address=iclientgw-sea.alipay.com list=reminder-allow-site
add address=imgs-ac.alipay.com list=reminder-allow-site
add address=ilog-sea-aliyun.aliplus.com list=reminder-allow-site
add address=payments.paymaya.com list=reminder-allow-site
add address=api-bnpl.mayabank.ph list=reminder-allow-site
add address=api.mayabank.ph list=reminder-allow-site
add address=assets.maya.ph list=reminder-allow-site
add address=payments.maya.ph list=reminder-allow-site
add address=shopeepay.ph list=reminder-allow-site
add address=deo.shopeemobile.com list=reminder-allow-site
add address=pay.shopee.sg list=reminder-allow-site
add address=dem.shopee.com list=reminder-allow-site
add address=c-api-bit.shopeemobile.com list=reminder-allow-site
add address=api.gw.shopeepay.ph list=reminder-allow-site
add address=df.infra.shopee.ph list=reminder-allow-site
add address=iam-assets.paymaya.com list=reminder-allow-site
/ip hotspot walled-garden ip
add action=accept disabled=no !dst-address dst-address-list=reminder-allow-site !dst-port !protocol !src-address !src-address-list comment="ALLOW LIST FOR ECASH PAYMENT"
/ip hotspot walled-garden ip
                                

Installing Plugin to JuanFi

Be sure that you are done purchasing VPN account first before proceeding on this step.


Step 1: Getting your JuanFi API Key

We will need to assign 1 Juanfi Nodemcu to create a voucher when your customer bought voucher code via EWallet. With this, we will need the JuanFi API Key. In order to find it, you will need to open your JuanFi Admin page
  1. Open the JuanFi admin page via http://NodemcuIPAddress/login.
    For example: http://10.0.0.74/login
  2. Login with your Juanfi username and password. You should now this :)
  3. Navigate to System Configuration, then API Key
  4. Take note of the Nodemcu IP Address and API Key
  5. Proceed to Step 5
Note: It is my recommendation to create a dedicated/separate juanfi nodemcu that will be assigned for this purpose. You just need to flash a new nodemcu, then bind it to your mikrotik.

Step 2: Binding your JuanFi API Key

Open Telegram app, then search for the bot wifree-voucher-ewallet-portal, and type the following command:
/juanfi [SPACE] YOUR-PORTAL-KEY [SPACE] YOUR-PAYMENT-REFERENCE# [SPACE] YOUR-JUANFI-API-KEY

For example:
/juanfi 65a368a16332f REGISTEREWALLETPORTAL-09669041361-juanfi-65a368a16332f-801107489 test123

Wherein,
65a368a16332f -->> the portal key created on Purchase VPN via telegram Step 3
REGISTEREWALLETPORTAL-09669041361-juanfi-65a368a16332f-801107489 -->> the payment ref# created on Purchase VPN via telegram Step 3
test123 -->> The API Key that you taken note from How to install plugin to JuanFi Step 4
                                
After submitting the command, you should receive a You've successfully updated your Juanfi API key response.

Step 6.5:


Step 6.6:


Sample of what it looks like when dragging the NAT entry to top most.

Step 3: Port forward SSTP to Nodemcu IP Address

We will need to port forward the SSTP local IP Address to your Nodemcu IP address (From Step 4). To do this,
  1. Open your Mikrotik WinBox
  2. Navigate to IP, then Firewall
  3. Proceed to NAT tab
  4. Click + button
  5. Add the following on General Tab:
    - Chain: dstnat
    - Dst. Address: SSTP Local address --> You can get this on Step 2
    - Protocol: 6 (tcp)
    - Dst Port: 80
  6. Add the following on Action Tab:
    - Action: dst-nat
    - To Addresses: Nodemcu IP Address --> You can get this on Step 4
    - To Ports: 80
  7. Click Ok button
Once NAT has been added, make sure to move the entry to the top most by dragging it (please see screenshot for reference).

Step 4: Adding a widget to your hotspot template

We're almost done! Now, we will need to add a widget button to your hotspot template.
TAKE NOTE: You will need to identify how your hotspot template were build. In my experience, there are two types:

template#1 - you will need to open and check your login.html and status.html. If the said file contains long HTML codes, then it is template#1

template#2 - check login.html and status.html. If the said file contains redirect code, then it is template#2. One example is the said file only contains

location.replace('/portal.html');
                                    
Where the portal.html is your main file. Take note that other hotspot template have different .html name

For template#1 - Open status.html and login.html using notepad or note++ (recommended)
For template#2 - Open the redirect file. E.g portal.html (this is just a sample in my case)
then find the /body tag (This usually at the end of the file). Add the code below:
    
	


                                
Replace the src value with your portal key. For example:
https://payments.wifree.network/widget/voucher/juanfi/index.html?portal_key=[YOUR-PORTAL-KEY]
The portal key is provided on Purchase VPN via telegram Step 3. Here's an example for your reference:

Step 5: Check if the widget has been successfully added

Once you followed all the steps, you should be able to see a widget on your hotspot portal. Congratulations! Your customer may now purchase voucher code using Ewallets like GCash and PayMaya.

You may test the payment widget on yourself if its working. Below are the sample for your reference.

ADOPISOFT SYSTEM - Purchase Portal Key via Telegram

Note: Make sure that you already registered and downloaded Telegram on your Mobile Phone or PC


Step 1: Finding the telegram bot.

Open Telegram app, then search for the bot wifree-voucher-ewallet-portal, then click start
Note: This will be the same process on Mobile phone.

You should receive a message response just like this:

Hi,

Welcome to Voucher Purchase Self-service hub.
This bot will help you to install voucher purchase portal using EWallets (Gcash, Paymaya, Shopeepay, etc.)
on your Vendo System. Please see registration fee below:

Vendo System:
- JuanFi --> 250PhP
- Adopisoft --> 100PhP

Please type /register command to get you started.
                                    


Step 2: Generate Checkout link

You will need to create a checkout link for portal key and VPN account by typing below format, then SEND.

/register [SPACE] YourGCashNumber [SPACE] ado

For example:
/register 09669041361 ado
                                    
Note: Make sure that you will add a valid GCash number when generating the checkout link. The submitted GCash number will be used as a receiver for disbursement. A checkout link should be generated after submitting the command above.


Step 3: Proceed with Payment

You will be redirected to checkout page once you click the generated checkout link. You may select any EWallet or Bank to proceed with the purchase, just follow to on-screen instruction after selecting the preferred channel.

Note: Make sure that you added a valid GCash number on Step 2 when generating the checkout link. The submitted GCash number will be used as a receiver for disbursement. A checkout link should be generated after submitting the command above.

You should receive the same message below when your purchase is successful.
We've received your payment and now processing your voucher portal key. We would request for your patience during this time. Here's your payment ref#: REGISTEREWALLETPORTAL-0966xxx-ado-xxx-xxx.


Step 4: WAIT!

Yup, we need you to wait.

System is now processing your VPN account. It would just take at least more or less than 5 minutes. After this, you should receive another the same message below:

Thank you for your patience. Here's your account details:
Portal Key: ******

Congratulations! You've successfully purchased a Portal account and now ready to install the plugin for Adopisoft System

Installing Plugin to MikRotik

Be sure that you are done purchasing VPN account first before proceeding on this step.


Step 1: Check if Mikrotik API services is enabled

Yes, we need to double-check if your Mikrotik API services is enabled. To do this,
  1. Open your Mikrotik WinBox
  2. Navigate to IP, then Services
  3. api should be enabled
  4. Port should be 8728

Step 2.1: Selecting Portal key


Step 2.3: Filling out form sample


Step 2.4: Clickng Test connection

Step 2: Adding Mikrotik Credentials to Dashboard

Go to https://payments.wifree.network/register.html, login your account, then navigate to Mikrotik > Configuration
  1. Select your portal key by clicking action button
  2. A new pop up window should appear
  3. Fill out the following:
    • * Mikrotik IP / URL - This will be your SSTP VPN Local Ip address that you purchase on Getting Started
    • * Mikrotik Username - Your Mikrotik username
    • * Mikrotik Password - Your Mikrotik password
  4. then click Test Connection button
You should be able to see a "Test connection Success!" message when everything has been configured correctly.
YOU MAY KNOW PROCEED TO NEXT STEP.

Step 3.1: Sample WiFi Rates


Step 3.3: Sample Hotspot Settings

Step 3: WiFi Rates and Hotspot Settings Configuration

We will now setup your WiFi Rates and Authentication login settings.
Head back to Piso WiFi > ECash Portals, then do the following:
  1. Click WiFi Rates Tab
  2. Add your WiFi Rates
  3. Once done, click Hotspot Settings tab
    *Login Option - you need to select what type of login option does your portal uses.
    ---> Username Only - Means that the system will generate New Hotspot user with Name only. JuaFi usually uses this kind of login
    ---> Username + Password - This means that the system will generate both Name and Password with the same values. Mikhmon usually use this.
    *Hotspot User Profile - The user profile that your hotspot will be using. Usually default.
  4. Once all done, click Save changes button

Step 4: Adding a widget to your hotspot template

We're almost done! Now, we will need to add a widget button to your hotspot template.
TAKE NOTE: You will need to identify how your hotspot template were build. In my experience, there are two types:

template#1 - you will need to open and check your login.html and status.html. If the said file contains long HTML codes, then it is template#1

template#2 - check login.html and status.html. If the said file contains redirect code, then it is template#2. One example is the said file only contains

location.replace('/portal.html');
                                    
Where the portal.html is your main file. Take note that other hotspot template have different .html name

DONE IDENTIFYING YOUR HOTSPOT TEMPLATE? Let's Proceed!
  1. Open your HTML file
    --> For template#1 - Open status.html and login.html using notepad or note++ (recommended)
    --> For template#2 - Open the redirect file. E.g portal.html (this is just a sample in my case)
  2. find the /body tag (This usually at the end of the file).
  3. Add the code below the /body tag:
    
    
                
                
    			
    			
    			
                
                                            
    NOTE: If your template does not include jquery.min.js,
    kindly remove the comment of the code above to include jquery as well.
  4. Create api.html file, then add this code in it.
    {
        "captive": $(if logged-in == 'yes')false$(else)true$(endif),
        "user_portal_url": "$(link-login-only)",
        $(if session-timeout-secs != 0)
        "seconds-remaining": $(session-timeout-secs),
        $(endif)
        $(if remain-bytes-total)
        "bytes-remaining": $(remain-bytes-total),
        $(endif)
        "can_extend_session": true,
        "ip": "$(ip)",
        "mac": "$(mac)",
        "portal_key": "REPLACE_WITH_YOUR_PORTAL_KEY",
        "vpn_ip": "REPLACE_WITH_YOUR_VPN_LOCAL_IP",
        "voucher_input_id": "REPLACE_WITH_YOUR_INPUT_VOUCHER_ID",
        "voucher_submit_id": "REPLACE_WITH_YOUR_SUBMIT_VOUCHER_ID"
    }
    
                                            
  5. Replace the following values:
    * portal_key - Your portal key
    * vpn_ip - Your VPN LOCAL IP address. You get this on Getting started step 2.
    * voucher_input_id - ID of your hotspot input voucher
    * voucher_submit_id - ID of your hotspot submit button
  6. Add the api.html file into your hotspot folder, then upload it into your Mikrotik

Step 8: Check if the widget has been successfully added

Once you followed all the steps, you should be able to see a widget on your hotspot portal. Congratulations! Your customer may now purchase voucher code using Ewallets like GCash and PayMaya.

You may test the payment widget on yourself if its working. Below are the sample for your reference.

Receive Telegram notification

Doing this step will enable you to receive a telegram notification of the following:
  1. When your customer purchased voucher code via EWallet
  2. When our system will disbursement payments to your GCash Account

Open Telegram app, then search for the bot wifree_alert_bot, then click start
Note: This will be the same process on Mobile phone.

You should receive a message response just like this:

Hi,

Thank you for availing PPPoE/Hotspot GCASH payment.
Here's your ChatID: 801107489
                                    
Take note of the ChatID.

Head back to wifree-voucher-ewallet-portal bot, then send the command format below:

/telegram [SPACE] YOUR-PORTAL-KEY [SPACE] YOUR-PAYMENT-REFERENCE# [SPACE] YOUR-ChatID

For example:
/telegram 65a368a16332f REGISTEREWALLETPORTAL-09669041361-juanfi-65a368a16332f-801107489 801107489

Wherein,
65a368a16332f -->> the portal key created on Purchase VPN via telegram Step 3
REGISTEREWALLETPORTAL-09669041361-juanfi-65a368a16332f-801107489 -->> the payment ref# created on Purchase VPN via telegram Step 3
801107489 -->> The ChatID
                                
After submitting the command, you should receive a You've successfully updated your telegram notification settings.