Jumpseller


Implementation of Paygol as a payment gateway

 

Paygol dashboard

  • Create a Paygol account and sign in.
  • Make sure that your account is in Live mode.
  • At the “Notifications” section you will find your Service ID and Secret Key, you will need them later so keep them at hand.

Jumpseller dashboard

  • Sign into your Jumpseller account.
  • Go to “Settings > Payments” and click “Add Payment Method”.
  • Choose “External Payment Gateway”
  • Enter “https://www.paygol.com/pay/jumpseller” as “Payment method URL”
  • Enter the Service ID of your Paygol account as Payment method key
  • Enter the Secret Key of your Paygol account as Payment method secret


Paygol module for WHMCS, version 4.3

 

Requirements

 

Installation

  • Download WHMCS module.
  • Unzip the paygol-for-whmcs_4.3.zip file directly in the modules/gateways folder of your WHMCS installation.
  • Activate the Paygol module in your WHMCS admin panel (Setup -> Payments -> Payment Gateways -> All Payment Gateways).
  • Look for “Paygol” button and click on.
  • Log into your Paygol Dashboard and go to “Notifications” section, copy the Service ID and Secret Key from your account and paste them into the corresponding fields at the module’s setup page on your WHMCS site.
  • Copy the “IPN URL” from your Paygol’s module setup and paste it into the “IPN URL” field at the “Notifications” section of your Paygol dashboard, then save the changes.
  • Click on “Save Changes” in your WHMCS site.

 

Testing

To test the newly installed module you can enable your service’s test mode at the upper right screen of your dashboard, at Paygol’s website. Be sure to change it back before going live.

 

Important Notes

  • While in test mode, an IPN request (payment notification to your platform) will be issued immediately after each test.
  • After the payment is completed, the “Payment Status” will show as completed but the “Status” will show as pending until you accept the order at your WHMCS panel, this is a default WHMCS safety measure to prevent any kind of frauds.
  • 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 “Unpaid“, 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.

 

Screenshots

DonationCraft


How to enable Paygol as a payment gateway – DonationCraft

 

Paygol dashboard

  • Create a Paygol account and sign in.
  • Make sure that your account is in Live mode.
  • At the “Notifications” section, enter your IPN (eg. “http://shopname.enjin.com/paygol.php” ) into the IPN URL field ( your exact IPN can be found in your Enjin admin panel). 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.

Enjin dashboard

  • Sign into your Enjin admin panel.
  • Go to “Modules > Donationcraft server store > Settings > Payments gateways”.
  • Select the Paygol gateway, click “accept payments through Paygol.com”, then enter the Service ID and Secret Key of your Paygol account.
  • Click “Save changes” to complete the setup.

You’re done!

You can now start accepting payments with Paygol!

 


Tebex 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.tebex.io/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.

Tebex dashboard

  • Sign into your Tebex account
  • Go to “Settings > Payment Gateways” in Tebex 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 Tebex documentation.


Paygol module for WooCommerce, version 1.3.3

 

Requirements

 

Installation

  • Log into your WooCommerce admin dashboard.
  • There’s 3 ways to install our plugin:
  1. Go to “Plugins -> Add new”, type on “paygol for woocommerce” in the “Search plugin” field and press “Install Now”. (RECOMMENDED)
  2. Download the plugin from the Official WordPress Plugins page, click “Upload plugin”, select the file from your computer and press “Install Now”.
  3. Download the plugin from the Official WordPress Plugins page, open your FTP and extract the plugin’s folder into wp-content/plugins/.
  • Go to “Plugins -> Installed Plugins” look for “Paygol plugin for Woocommerce” and press “Activate”.
  • Go to “WooCommerce->Settings->Checkout->Paygol” then log into your Paygol Dashboard and go to “Notifications” section, copy the Service ID and Secret Key from your account and paste them into the corresponding fields at the module’s setup page on your WooCommerce.
  • Copy the “Payments notification URL (IPN)” from your Paygol’s module setup and paste it into the “IPN URL” field at the “Notifications” section of your Paygol dashboard, then save the changes.
  • Click on “Save Changes” in your WooCommerce site.

 

Testing

To test the newly installed module you can enable your service’s test mode at the upper right screen of your dashboard, at Paygol’s website. Be sure to change it back before going live.

 

Important Notes

  • While in test mode, an IPN request (payment notification to your platform) 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 payment”, and only once it’s confirmed by the provider will it show as “Processing” (Wich it means that order is paid and waiting to be shipped). We strongly recommend that you inform your customers about this beforehand in order to avoid confusions.


Paygol module for OpenCart, version 4.3

 

Requirements

 

Installation

  • Download the Paygol OpenCart module.
  • Log into your OpenCart administration section.
  • Upload the file “paygol-for-opencart.1.2.ocmod.zip” (Extensions -> Installer -> Click “Upload“).
  • Install the Paygol module (Extensions -> Extensions -> Choose the extension type: “Payments” -> Search for “Paygol” -> Click “Install”), don’t close this page yet.
  • Select “Edit” (click on the pencil icon) to enter the module’s setup page.
  • Copy the “IPN URL” and paste it into the “IPN URL” field at the Notifications section of your Paygol dashboard, then save the changes.
  • At the Notifications section of your Paygol dashboard, copy the Service ID and Secret Key of your account and paste them into the corresponding fields at the module’s setup page.
  • Activate the module (change the “Status” option to “Enabled“)
  • Save the changes.

 

Testing

To test the newly installed module you can enable your account’s test mode by changing from “Live” to “Test” at your Paygol dashboard. Be sure to change it back when going live.

 

Important Notes

  • While in test mode, an IPN request (payment notification to your platform) 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 will not appear in the orders list until the payment is confirmed. We strongly recommend that you inform your customers about this beforehand in order to avoid confusions.
Basic Implementation

 

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


 


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="">
   <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>

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 entering credit card information) in order to test transactions.

 

Advanced implementation

 

Overview
How to use the advanced implementation
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="">
   <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>
   Name: <input type="text" name="pg_first_name"><br><br>
   Last name: <input type="text" name="pg_last_name"><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>

Parameters description

The following POST/GET parameters are required:

 

Codes for available payment methods:

Name Code Description

 

API Implementation

 

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


 

Documentation for the implementation API v1.2 is available.

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 JSON response, according to your preference. The response will contain a 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 Coverage Code Description

Example:

<?php

$endpoint_url = 'https://www.paygol.com/pay?';

$params = [
  'pg_mode'=>'api',
  'pg_serviceid'=>123,
  'pg_price'=>10.00,
  'pg_currency'=>'EUR',
  'pg_custom'=>'player123',
  'pg_country'=>'DE',
  'pg_language'=>'de',
  'pg_method'=>'creditcard',
  'pg_format'=>'json',
  'pg_ip'=>'123.13.12.13',
  'pg_email'=>'[email protected]',
  'pg_first_name'=>'josdhsn',
  'pg_last_name'=>'smitdh',
  'pg_personalid'=>'1234567238-6',
  'pg_return_url'=>'http://www.mysite.com/return.php',
  'pg_cancel_url'=>'http://www.mysite.com/cancel.php'
];

$buff = [];
foreach ($params as $k => $v) {
  array_push($buff, "{$k}={$v}");
}

$url = $endpoint_url . implode('&', $buff);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$result = curl_exec($ch);
curl_close($ch);

$response = json_decode($result, true);

Reply JSON

{
    "data": {
        "service_id": "123",
        "transaction_id": "NDFF-PM4J-PVIA-CM1O",
        "status": "created",
        "payment_method": "creditcard",
        "amount": "10.00",
        "currency": "EUR",
        "payment_method_url": "https://www.paygol.com/api/pay-direct/NDFF-PM4J-PVIA-CM1O",
        "customer": {
            "first_name": "john",
            "last_name": "smith",
            "email": "[email protected]",
            "phone": "5531996145534",
            "personal_id": "58888854525",
            "country": "DE"
        },
        "redirect_urls": {
            "success_url": "http://www.mysite.com/return.php",
            "cancel_url": "http://www.mysite.com/cancel.php"
        }
    }
}

Reply in case of an error:

{
    "error": {
        "status": 400,
        "internal_code": "9702",
        "message": "Bad request - Invalid CPF"
    }
}

Reply (XML)

<transaction>
  <response>OK</response>
  <service>123</service>
  <payment_method>creditcard</payment_method>
  <payment_methods>creditcard,paysafecard,bitcoin,giropay,sofort</payment_methods>
  <id>NDFF-PM4J-PVIA-CM1O</id>
  <price>10.00</price>
  <currency>EUR</currency>
  <price_consumer>10.00</price_consumer>
  <currency_consumer>EUR</currency_consumer>
  <locale>es-CL</locale>
  <payment_method_url>https://www.paygol.com/api/pay-direct/NDFF-PM4J-PVIA-CM1O
</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>

 

Reply parameters XML format.

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:

<?php

$endpoint_url = 'https://www.paygol.com/api/check-payment?';

$params = [
    'service'=>'123',
    'id'=>'N38K-WMP9-HUHM-Q6G7',
    'format'=>'json',
];

$buff = [];
foreach ($params as $k => $v) {
  array_push($buff, "{$k}={$v}");
}

$url = $endpoint_url . implode('&', $buff);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$result = curl_exec($ch);
curl_close($ch);

var_dump(json_decode($result, true));

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

{
    "data": {
        "service_id": "123",
        "transaction_id": "N38K-WMP9-HUHM-Q6G7",
        "status": "created",
        "payment_method": "itau",
        "amount": "5.00",
        "currency": "EUR",
        "created_at": "2019-04-08 00:21:00",
        "completed_at": null,
        "customer": {
            "first_name": "john",
            "last_name": "smith",
            "email": "[email protected]",
            "phone": "5531996145534",
            "personal_id": "58888854525",
            "country": "BR"
        }
    }
}

Reply in case of an error:

{
    "error": {
        "status": 404,
        "internal_code": "0302",
        "message": "Bad request - Transaction 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>

Reply parameters XML format.

Status Definitions

Completed-Consumer completed the payment process successfully and your account has been credited
Created-Consumer never completed the payment process, or the payment has not yet been registered by the payment method provider
Failed-Consumer attempted a payment but the payment method provider did not accept the payment 
Rejected-Paygol has rejected the payment, likely due to a notification from the payment method provider

Premium SMS implementation

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.