Paygol Module for Dating Pro

 

About software

  • Cupid 2014.3 version or above.

Installation

  • Download the Dating Pro module.
  • Create a Paygol account.
  • At your DatingPro site panel, enter both the Service ID and Secret Key of your Paygol account (can be found at the “Notifications” section of your Paygol dashboard).
  • Paste the provided URL into the IPN URL field at the “Notifications” section of your Paygol dashboard.

Testing

  • To test the newly installed module, you can enable your account’s Test mode on top of your Paygol dashboard. Be sure to change it back before going live.

Paygol module for PrestaShop, version 1.1

 

About Paygol:

 

Requirements:

  • Working PrestaShop installation (tested with PrestaShop v1.6.1.13,  v1.6.1.6  and  v1.6.1.0).
  • Paygol account, you can register for free at https://secure.paygol.com/signup.

 

Installation:

  • Download our PrestaShop module.
  • Option 1 : upload the file via FTP, decompress the content of the “paygol_for_prestashop_1.1.zip” file, directly in the file “modules” in your PrestaShop site.
  • Option 2 : upload the file to the server via PrestaShop. Please go to “modules and services”, add a new module, press “select a file”, look for the file in your computer (“paygol_for_prestashop_1.1.zip”), press the “upload this module” button, wait until the module is installed and then proceed with the setup.
  • Activate the module “Paygol” in your administration panel of PrestaShop (modules and services, module list, look for the module “paygol”). Select install and configure. Then go to the configuration of the Paygol module.
  • Enter both the Service ID and Secret Key of your Paygol account (can be found at the “Notifications” section of your Paygol dashboard).
  • Paste the provided URL into the IPN URL field at the “Notifications” section of your Paygol dashboard.

 

Testing:

  • To test the newly installed module, you can enable your account’s Test mode on top of your Paygol dashboard. Be sure to change it back before going live.

 

Important Notes:

  • While in test mode, an IPN request (payment notification) will be issued immediately after each test.
  • Payments are usually notified immediately; however, certain payment methods may take longer to confirm the payment (e.g. methods that take a few minutes to notify the transaction, or voucher-based transactions that require the payer to print it in order to pay by cash at a given place). In these cases the product is shown as not paid, and only once it’s confirmed by the provider will it show as paid. We strongly recommend that you inform your customers about this beforehand in order to avoid confusions.

 


 

 


Paygol module v1.1 for BoxBilling

 

Requirements

  • Working BoxBilling installation (tested with version 4.20).
  • Paygol account.

Installation

  • Download BoxBilling module.
  • Unzip paygol_for_boxbilling_1.1.zip directly into your Boxbilling folder.
  • To install the module, go to your BoxBilling administration panel (Configuration -> Payment Gateways), select Paygol at the “New payment gateways” tab, then click “Install”.
  • Once installed, proceed to the module’s configuration page (Configuration -> Payment Gateways), select Paygol and click “Edit”.
  • Enter both the Service ID and Secret Key of your Paygol account (can be found at the “Notifications” section of your Paygol dashboard).
  •  Make sure that the module is configured as follows:
    – “Enabled: Yes”.
    – “Allow one time payments: Yes”.
    – “Enable test mode: No“. (please check the “Testing” section of this document for information on how to make test transactions).
  • Paste the provided URL into the IPN URL field at the “Notifications” section of your Paygol dashboard.

Testing

  • To test the newly installed module, you can enable your account’s Test mode on top of your Paygol dashboard. Be sure to change it back before going live.

Paygol button image

In order for all instances of the Paygol button to be shown correctly, please do as follows:

  • Edit “logos.css” from your BoxBilling installation. It’s located at “bb-themes/huraga/assets/css/logos.css”.
  • Add the following lines to the end of the file.
.logo-Paygol
{
background: transparent url("../img/gateway_logos/Paygol.png") no-repeat scroll 0% 0%;
background-size: contain;
width:80px;
height: 28px;
border: 0;
margin: 10px;
}
  •  Save changes.
Please note:

If you are not using the default theme “huraga”, you need to do the following:

  • Modify the CSS file on the right folder, not in “huraga”. e.g. “bb-themes/mytheme/assets/css/logos.css”.
  • Copy image “bb-themes/huraga/assets/img/gateway_logos/Paygol.png” to a similar path for the other theme.
    e.g. “bb-themes/mytheme/assets/img/gateway_logos/Paygol.png”.
  • As an alternative to the previous steps, just rename the folder name with the right one before copying it to your server.

Important Notes

  • While in test mode, an IPN request (payment notification) will be issued immediately to your platform after each test.
  • After a payment is completed it will be shown as completed but Pending Setup until you activate it at your BoxBilling panel.
  • Payments are usually notified immediately; however, certain payment methods may take longer to confirm the payment (e.g. methods that take a few minutes to notify the transaction, or voucher-based transactions that require the payer to print it in order to pay by cash at a given place). In these cases the product is shown as not paid, and only once it’s confirmed by the provider will it show as paid. We strongly recommend that you inform your customers about this beforehand in order to avoid confusions.


How to enable Paygol as a payment gateway – DonationCraft

 

Implementation

  1. See implementation in DonationCraft
  2. Register an account with Paygol here and log in.
  3. On the navigation menu after logged in click “Create Service”.
  4. Click “Start Now,” in the left column, for our Standard Implementation.
  5. In the form enter the following information
    • Service Name – This is up to you, name your service with a simple name.
    • Type of Service – Integrated
    • Price – This is up to you.
    • Report Email – This is up to you
    • URL Background – Leave this blank for now, we will come back to this later.
    • URL Success & Cancel – leave blank
    • Link Website – ‘Your account’.enjin.com
    • Description –  Enjin Donation Craft
    • Countries – This is up to you, but we would recommend selecting all countries for all payment methods.
    • Under the countries selection, click “Save”.
  6. After saving, you should be brought to your services page. On this page, copy your service ID in the services table.
  7. Go back to your DonationsCraft module settings in your Enjin admin panel, paste your service ID into your Paygol settings. Save.
  8. Refresh the page, and your background URL will be generated underneath where you just entered in your service ID. Copy this full URL.
  9. Go back to your services page on Paygol’s website. Click the pencil icon to edit this service.
  10. Paste your new background URL in the designated area. Save.

You’re done!

You can now start accepting payments from Paygol!


Buycraft Implementation

 

Paygol dashboard

  • Create a Paygol account and sign in.
  • Make sure that your account is in Live mode.
  • At the “Notifications” section, enter “https://www.buycraft.net/ipn/paygol” into the IPN URL field. You can also enter an email address so you can get payment notifications.
  • You will also find your Service ID and Secret Key, you will need them later so keep them at hand.

 

Buycraft dashboard

  • Sign into your Buycraft account
  • Go to “Settings > Payment Gateways” in Buycraft and click “Add Gateway”.
  • Select the Paygol gateway, then enter the Service ID and Secret Key of your Paygol account.
  • Choose to enable a price offset if you want to.
  • Click “Create” to complete the setup.

 

For more information, please check the Buycraft documentation.


Paygol module for WooCommerce v1.3

 

About this module

Requires at least: 3.7.0
Tested up to: 4.7.5
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Installation

  • Download our  WooCommerce module.
  • You’ll need a working WordPress installation using the WooCommerce plugin (tested on versions 2.3.0 up to 3.0.7).
  • Create a Paygol account at https://secure.paygol.com/signup.
  • Go to “Plugins -> Add new“, search for the Paygol plugin in the WordPress Plugin Directory then click “Install now“.
    You can also click “Upload plugin” to manually upload the plugins’ zip file, after which it will be installed automatically.
    If for any reason this fails, you can also manually extract the plugin’s folder into wp-content/plugins/.
  • In your WordPress plugins panel, activate the Paygol plugin.
  • Go to the checkout configuration and proceed to configure the plugin:
    – The text fields contain the text that will be used during the checkout process.
    – The Service ID and Secret Key of your account can be found at the “Notifications” section, at your Paygol dashboard.
    – Paste the IPN URL generated by the module into the “IPN URL” field at the “Notifications” section, at your Paygol dashboard.

Changelog

1.3

  • New release, tested with WordPress 3.7.0 up to 4.7.5, and WooCommerce 2.3.0 up to 3.0.7
  • Added validation for payment notifications.

1.2

  • New release, tested with WordPress 3.7.0 up to 4.7.3, and WooCommerce 2.3.0 up to 2.6.14.
  • Updated with new logo.

1.1

  • New release, tested with WordPress 3.7.0 up to 4.6.1, and WooCommerce 2.3.0 up to 2.6.7.

1.0

  • Initial release.

Recommendations and important notes

  • To test the newly installed module, you can enable your account’s Test mode on top of your Paygol dashboard. Be sure to change it back before going live.
  • Some payment methods provided by Paygol (such as credit card payments) will confirm the payment immediately, so the payer will see the payment status as “Completed“. However, other payment methods (such as local cash payment services) may take longer to confirm the payment. In these cases the payer will see the status “Processing“. After the payment is confirmed by the local payments provider, the status will internally be updated to “Completed“. Depending on your specific needs, you may want to use the “Hold Stock” WooCommerce setting if you need to make sure that stock is available for payments that are not notified immediately.


Paygol module for OpenCart v1.1

 

Requirements

Installation

  • Download the OpenCart module.
  • Upload the file “paygol-for-opencart.1.1.ocmod.zip” via OpenCart, directly from the admin menu (Dashboard -> Extension installer -> Upload (button) -> select file, wait for the progress bar to fill).
  • Install the Paygol module in your OpenCart admin panel (Extensions -> Payments -> Search “Paygol” -> Press Install).
  • Enter both the Service ID and Secret Key of your Paygol account (can be found at the “Notifications” section of your Paygol dashboard).
  • Activate the module, proceed to the module’s setup page (Extensions -> Payments -> Search “Paygol” -> Press “Edit” -> Status -> Enabled).
  • Paste the provided URL into the IPN URL field at the “Notifications” section of your Paygol dashboard.

Testing

  • To test the newly installed module, you can enable your account’s Test mode on top of your Paygol dashboard. Be sure to change it back before going live.

Important Notes

  • While in test mode, an IPN request will be issued immediately after each test.
  • Payments are usually notified immediately; however, certain payment methods may take longer to confirm the payment (e.g. methods that take a few minutes to notify the transaction, or voucher-based transactions that require the payer to print it in order to pay by cash at a given place). In these cases the product is shown as pending, and only once it’s confirmed by the provider will it show as paid. We strongly recommend that you inform your customers about this beforehand in order to avoid confusions.

 

How to use the Basic Implementation
Parameters description
How to test your service
IPN
IPN Parameters description

 


How to use the basic implementation

The code below is ready to use. Just copy the piece of code into your web page, replace the values with your own and you will be ready to go.

<form name="pg_frm" method="post" action="https://www.paygol.com/pay" >
   <input type="hidden" name="pg_serviceid" value="123">
   <input type="hidden" name="pg_currency" value="EUR">
   <input type="hidden" name="pg_name" value="DEMO">
   <input type="hidden" name="pg_custom" value="">
   <input type="hidden" name="pg_price" value="1">
   <input type="hidden" name="pg_return_url" value="http://www.paygol.com/webapps/implementation">
   <input type="hidden" name="pg_cancel_url" value="">
   <input type="image" name="pg_button" src="https://www.paygol.com/webapps/img/buttons/150/black_en_pbm.png" border="0" alt="Make payments with Paygol: the easiest way!" title="Make payments with Paygol: the easiest way!" >     
</form>

Parameters description

The following POST/GET parameters are required:

How to test your implementation

On top of your Paygol dashboard you will be able to switch between Live and Test mode. In Test mode you can simulate transactions with no need to spend real money (just click OK on your payment screen and a successful payment will be simulated).

Please note that you don’t need to perform any external actions (such as sending SMS or entering credit card information) in order to test transactions.

IPN

What is IPN?
Instant Payment Notification (IPN) is a message service that notifies you of events related to Paygol transactions. You can use it to automate back-office and administrative functions, such as fulfilling orders, inserting points or coins, upgrading membership, tracking customers, and providing status and other information related to a transaction.

Information about the payment
Paygol makes a GET request to your IPN file when your customer completes the transaction. You can use this notification to kick-off order fulfillment, enable digital media downloads, store information in a customer relationship management (CRM) or accounting system, and so on.

How to receive the IPN information in my web page?
Paygol provides samples of Instant Payment Notification (IPN) code for popular development environments. For custom IPN files, you can use the following sample code as a starting point.

Example:

<?php 

$secret_key = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee";  // Enter secret key for your service. 

// Secret key validation 
if ($secret_key != $_GET['key']) {
    echo "Validation error"; 
    exit;
}

// get the variables from Paygol system
$transaction_id	  = $_GET['transaction_id'];
$service_id	      = $_GET['service_id'];
$shortcode	       = $_GET['shortcode'];
$keyword	         = $_GET['keyword'];
$message	         = $_GET['message'];
$sender	          = $_GET['sender'];
$operator	        = $_GET['operator'];
$country	         = $_GET['country'];
$custom	          = $_GET['custom'];
$price	           = $_GET['price'];
$currency	        = $_GET['currency'];

// Here you can do whatever you want with the variables, for instance inserting or updating data into your Database 

?>

IPN Parameters description

 

 

Overview
How to use the advanced implementation
Parameters description
IPN
IPN Parameters description

 


Overview

Our advanced implementation is a white label payments solution which allows you to redirect your customers directly to a local payment method with no need to open the Paygol payment screen.

How to use the advanced implementation

Below is a sample code for your payment button. Just replace any placeholder values as needed and you are ready to go.

<form name="pg_frm" method="post" action="https://www.paygol.com/pay" >
   <input type="hidden" name="pg_serviceid" value="123">
   <input type="hidden" name="pg_currency" value="EUR">
   <input type="hidden" name="pg_custom" value="">
   <input type="hidden" name="pg_price" value="1">
   <input type="hidden" name="pg_return_url" value="http://www.paygol.com/webapps/implementation">
   <input type="hidden" name="pg_cancel_url" value="">
   <input type="hidden" name="pg_mode" value="advanced">
   <input type="hidden" name="pg_country" value="GB">
   <input type="hidden" name="pg_method" value="creditcard">
   Email: <input type="text" name="pg_email"><br><br>
   Personal ID: <input type="text" name="pg_personalid"><br><br>
   <input type="image" name="pg_button" src="https://www.paygol.com/webapps/img/buttons/150/black_en_pbm.png" border="0" alt="Make payments with PayGol: the easiest way!" title="Make payments with PayGol: the easiest way!" >     
</form>

Parameters description

The following POST/GET parameters are required:

 

Codes for available payment methods:

Name Code Description

IPN

What is IPN?
Instant Payment Notification (IPN) is a service that notifies you of events related to Paygol transactions. You can use it to automate back-office and administrative functions, such as fulfilling orders, inserting points or coins, upgrading membership, tracking customers, and providing status and other information related to a transaction.

Information about the payment
Paygol will make a GET request to your IPN file when your customer completes a transaction. You can use this notification to kick-off order fulfillment, enable digital media downloads, store information in a customer relationship management (CRM) or accounting system, and so on.

How to receive the IPN information in my web page?
Paygol provides samples of Instant Payment Notification (IPN) code for popular development environments. For custom IPN files, you can use the following sample code as a starting point.

Example:

<?php 

$secret_key = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee";  // Enter secret key for your service. 

// Secret key validation 
if ($secret_key != $_GET['key']) {
    echo "Validation error"; 
    exit;
}


// get the variables from PayGol system
$transaction_id	  = $_GET['transaction_id'];
$service_id	      = $_GET['service_id'];
$country	         = $_GET['country'];
$custom	          = $_GET['custom'];
$price	           = $_GET['price'];
$currency	        = $_GET['currency'];
$frmprice	        = $_GET['frmprice'];
$frmcurrency	     = $_GET['frmcurrency'];

// Here you can do whatever you want with the variables, for instance inserting or updating data into your Database 

?>

IPN Parameters description

 

 

 

Overview
How to use the API Implementation
Parameters description
Checking the status of a payment
IPN
IPN Parameters description

 


Overview

Our API implementation offers a high level of customization, allowing you to implement an advanced white label payments solution directly on your platform in a fast and easy way.

This implementation is based in POST/GET requests to web-services which will return an XML or plain text response (according to your preference) containing detailed information on how to start a new payment. This way you can easily provide your customers with payment instructions (for your convenience we even provide pre-built payment instructions along with this information, when possible). In the case of payment methods that rely on a third party payment screen (such as non-mobile payment methods that allow direct bank transfers or let the end-user print a payment voucher) we will provide a payment URL you can redirect your customer to in order to start the payment process.

How to use the API implementation

To create a new payment you must make a request to the following URL:

https://www.paygol.com/pay

Parameters description

The following POST/GET parameters are required:

 

Codes for available payment methods:

Name Code Description

Example:

https://www.paygol.com/pay?pg_serviceid=123&pg_price=5.00&pg_currency=EUR&pg_custom=player123&pg_return_url=http://www.mysite.com/return.php
&pg_cancel_url=http://www.mysite.com/cancel.php&pg_mode=api&pg_country=ES&pg_language=es&pg_method=sms&pg_format=txt
&pg_ip=123.123.123.123&[email protected]&pg_personalid=12345678-6

Reply (plain text)
Reply for SMS payments:

OK|service|payment_method|payment_methods|id|keyword|pin|shortcode|sms|price|currency|price_consumer|currency_consumer|locale|locale_instructions
|disclaimer|custom|return_url|cancel_url

Example:

OK|123456|sms|sms,call|XXXX-YYYY-ZZZZ-1234|PAY|412537|3555|1|6.40|EUR|4.50|GBP|en-GB|Send PAY 412537 to 3555 (1 SMS)|Connection provided by ABC|player123
|http://www.mysite.com/return.php|http://www.mysite.com/cancel.php

Reply for call payments:

OK|service|payment_method|payment_methods|id|number|pin|time|price|currency|price_consumer|currency_consumer|locale|locale_instructions
|disclaimer|custom|return_url|cancel_url

Example:

OK|123456|sms|sms,call|XXXX-YYYY-ZZZZ-1234|0900 5500800|303012|00:00:47|6.40|EUR|4.50|GBP|en-GB|Call 0900 5500800 for 47 seconds. Keep your PIN 303012 at hand.
|Connection provided by ABC|player123|http://www.mysite.com/return.php|http://www.mysite.com/cancel.php

Reply for non-mobile payments.:

OK|service|payment_method|payment_methods|id|price|currency|price_consumer|currency_consumer|locale|payment_method_url|custom|return_url|cancel_url

Example:

OK|123456|webpay|sms,webpay|XXXX-YYYY-ZZZZ-1234|10.00|EUR|6800.00|CLP|es-CL|https://www.paygol.com/api/pay-direct/XXXX-YYYY-ZZZZ-1234
|player123|http://www.mysite.com/return.php|http://www.mysite.com/cancel.php

Reply in case of an error:

NOK|error_message

Example:

NOK|Wrong country

Reply (XML)
Reply for SMS payments (example):

<transaction>
  <response>OK</response>
  <id>XXXX-YYYY-ZZZZ-1234</id>
  <keyword>PAY</keyword>
  <pin>412537</pin>
  <shortcode>3555</shortcode>
  <sms>1</sms>
  <price>6.40</price>
  <currency>EUR</currency>
  <price_consumer>4.50</price_consumer>
  <currency_consumer>GBP</currency_consumer>
  <locale>en-GB</locale>
  <locale_instructions>Send PAY 412537 to 3555 (1 SMS)</locale_instructions>
  <disclaimer>Connection provided by ABC</disclaimer>
  <custom>player123</custom>
  <return_url>http://www.mysite.com/return.php</return_url>
  <cancel_url>http://www.mysite.com/cancel.php</cancel_url>
</transaction>

Reply for call payments (example):

<transaction>
  <response>OK</response>
  <id>XXXX-YYYY-ZZZZ-1234</id>
  <number>0900 5500800</number>
  <pin>303012</pin>
  <time>00:00:47</time>
  <price>6.40</price>
  <currency>EUR</currency>    
  <price_consumer>4.50</price_consumer>
  <currency_consumer>GBP</currency_consumer>
  <locale>en-GB</locale>
  <locale_instructions>Call 0900 5500800 for 47 seconds. Keep your PIN 303012 at hand.</locale_instructions>
  <disclaimer>Connection provided by ABC</disclaimer>
  <custom>player123</custom>
  <return_url>http://www.mysite.com/return.php</return_url>
  <cancel_url>http://www.mysite.com/cancel.php</cancel_url>
</transaction>

Reply for non-mobile payments. (example):

<transaction>
  <response>OK</response>
  <service>123456</service>
  <payment_method>webpay</payment_method>
  <payment_methods>sms,webpay</payment_methods>
  <id>XXXX-YYYY-ZZZZ-1234</id>
  <price>10.00</price>
  <currency>EUR</currency>
  <price_consumer>6800.00</price_consumer>
  <currency_consumer>CLP</currency_consumer>
  <locale>es-CL</locale>
  <payment_method_url>https://www.paygol.com/api/pay-direct/XXXX-YYYY-ZZZZ-1234</payment_method_url>
  <custom>player123</custom>
  <return_url>http://www.mysite.com/return.php</return_url>
  <cancel_url>http://www.mysite.com/cancel.php</cancel_url>
</transaction>

 

Reply in case of an error (example):

<transaction>
  <response>NOK</response>
  <error_message>Wrong country</error_message>
</transaction>

 

The reply parameters are the same regardless of the format used.

Checking the status of a payment

To check the status of a payment you must make a request to the following URL:

https://www.paygol.com/api/check-payment

The following POST/GET parameters are required:

Example:

https://www.paygol.com/api/check-payment?service=123&id=XXXX-YYYY-ZZZZ-1234&format=txt

Reply (plain text)
Transaction ID was found, regardless of its current status:

OK|status

Example:

OK|completed

Reply in case of an error:

NOK|error_message

Example:

NOK|Transaction ID not found

Reply (XML)
Transaction ID was found, regardless of its current status (example):

<transaction>
  <response>OK</response>
  <status>completed</status>
</transaction>

Reply in case of an error (example):

<transaction>
  <response>NOK</response>
  <error_message>Transaction ID not found</error_message>
</transaction>

The reply parameters are the same regardless of the format used.}

IPN

What is IPN?
Instant Payment Notification (IPN) is a service that notifies you of events related to Paygol transactions. You can use it to automate back-office and administrative functions, such as fulfilling orders, inserting points or coins, upgrading membership, tracking customers, and providing status and other information related to a transaction.

Information about the payment
Paygol will make a GET request to your IPN file when your customer completes a transaction. You can use this notification to kick-off order fulfillment, enable digital media downloads, store information in a customer relationship management (CRM) or accounting system, and so on.

How to receive the IPN information in my web page?
Paygol provides samples of Instant Payment Notification (IPN) code for popular development environments. For custom IPN files, you can use the following sample code as a starting point.

Example:

<?php 

$secret_key = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee";  // Enter secret key for your service. 

// Secret key validation 
if ($secret_key != $_GET['key']) {
    echo "Validation error"; 
    exit;
}

// get the variables from Paygol system
$transaction_id	   = $_GET['transaction_id'];
$service_id	       = $_GET['service_id'];
$shortcode	        = $_GET['shortcode'];
$keyword	          = $_GET['keyword'];
$message	          = $_GET['message'];
$sender	           = $_GET['sender'];
$operator	         = $_GET['operator'];
$country	          = $_GET['country'];
$custom	           = $_GET['custom'];
$points	           = $_GET['points'];
$price	            = $_GET['price'];
$currency  	       = $_GET['currency'];

// Here you can do whatever you want with the variables, for instance inserting or updating data into your Database 

?>

IPN Parameters description

 

Overview
IPN Start now
IPN Parameters description
IPN Use with your own parameters

 


 

Overview

As seen on TV an many others media you can create now your own marketing campaigns, polls, promotions, voting, and more. You can create your own keyword where your users can send text messages to.

For example: send TEXT to 1234

How does it work?
1. Users send a text message to your custom created keyword (e.g.: TEXT to 1234)
2. A pre-defined reply message by you will be sent back to the user (e.g.:Thanks for your message)
3. This payment will be charged to user’s mobile phone bill
4. You receive your earnings and a payment notification will be sent to you via e-mail

Some benefits:
– Immediate activation.
– No web site or any application required.
– Different price points per country.
– Great coverage.

 

IPN

What is IPN?
Instant Payment Notification (IPN) is a message service that notifies you of events related to Paygol transactions. You can use it to automate back-office and administrative functions, such as fulfilling orders, inserting points or coins, upgrading membership, tracking customers, and providing status and other information related to a transaction.

Information about the payment
Paygol makes a GET request to your IPN file when your customer completes the transaction. You can use this notification to kick-off order fulfillment, enable digital media downloads, store information in a customer relationship management (CRM) or accounting system, and so on.

How to receive the IPN information in my web page?
Paygol provides samples of Instant Payment Notification (IPN) code for popular development environments. Use working sample code to speed up your Paygol integrations.

This PHP sample code will just send you an e-mail everytime when a payment has been notified. Of course you can add your own funcionalities instead of just sending an email.

<?php 

$secret_key = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeee";  // Enter secret key for your service. 

// Secret key validation 
if ($secret_key != $_GET['key']) {
    echo "Validation error"; 
    exit;
}

// get the variables from Paygol system
$service_id	= $_GET['service_id'];
$shortcode	 = $_GET['shortcode'];
$keyword	   = $_GET['keyword'];
$subkeyword	= $_GET['subkeyword'];
$message	   = $_GET['message'];
$sender	    = $_GET['sender'];
$operator	  = $_GET['operator'];
$country	   = $_GET['country'];
$price	     = $_GET['price'];
$currency	  = $_GET['currency'];
 
// Here you can do whatever you want with the variables, for instance inserting or updating data into your Database 

?>
 

IPN Parameters description

 

IPN Use with your own parameters

What if I need some information from my customer?
Sometimes you might need to receive input from the payer, such as his/her username. Our Premium SMS services are ready for this and will let the payer add parameters after the message, which you can then use in any way you need.

So, how does it work?
Just tell your customer to send the message followed by the parameter.
For example, let’s say that your Premium SMS instructions are “Send GOL VIP to 1234”: In this case, if someone sends “GOL VIP JOHN”, the ‘message’ GET parameter on the IPN will contain “JOHN”.

Can I get multiple parameters?
Sure! For example, a message with the text “GOL VIP JOHN SWORD” will return “JOHN SWORD” through the ‘message’ GET parameter.
You can use even more parameters if you need to.