Advanced implementation

 

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