Pricing       Developers       Demo       Support    Sign up      Sign in   

Standard implementation


Go to Top
<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/pay-now/images/payment-button.png" border="0" alt="Make payments with PayGol: the easiest way!" title="Make payments with PayGol: the easiest way!" >    
</form>
Go to Top
Go to Top
Go to Top
<?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

?>
Go to Top

Go to Top
Go to Top
<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/pay-now/images/payment-button.png" border="0" alt="Make payments with PayGol: the easiest way!" title="Make payments with PayGol: the easiest way!" >    
</form>
Go to Top
Name Code Description
Go to Top
<?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

?>
Go to Top

Go to Top
Go to Top
https://www.paygol.com/pay
Go to Top
Name Code Description
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
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
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
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
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
OK|service|payment_method|payment_methods|id|price|currency|price_consumer|currency_consumer|locale|payment_method_url|custom|return_url|cancel_url
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
NOK|error_message
NOK|Wrong country
<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>
<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>
<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>
<transaction>
  <response>NOK</response>
  <error_message>Wrong country</error_message>
</transaction>
Go to Top
https://www.paygol.com/api/check-payment
https://www.paygol.com/api/check-payment?service=123&id=XXXX-YYYY-ZZZZ-1234&format=txt
OK|status
OK|completed
NOK|error_message
NOK|Transaction ID not found
<transaction>
  <response>OK</response>
  <status>completed</status>
</transaction>
<transaction>
  <response>NOK</response>
  <error_message>Transaction ID not found</error_message>
</transaction>
Go to Top
<?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

?>
Go to Top