Customizable Webcheckout Page

The Customizable Webcheckout Page is designed to downplay our payment gateway and keep the focus on your business and your products. Your customers will remain engaged with your brand longer and we believe that this will decrease cart abandonment rates and increase sales.

Enabling your Customized Webcheckout Page

  • Sign into your Paygol Dashboard.
  • Go to the Account section in your dashboard and click on the Customization tab.
  • You will then see two drop boxes. The top box is designated for your Logo and the bottom box is designated for your Background image/design.
  • Upload an image file to one, or both, of the boxes (please keep in mind the “Max size” restrictions for uploading files).
  • Once the images are visible in your dashboard, you can click “Save.” The page will be refreshed and your customized Webcheckout page will be enabled.

 Some Things to Consider

  • Use the customizable Webcheckout page as an extension of your webshop. Try to maintain the same color scheme and design pattern as your webshop.
  • The payment widget will always be located in the center of the Webcheckout page. Try not to use a background image that will be obstructed by the payment widget.
  • The Webcheckout page is only seen when using the Webcheckout Integration or using a Paygol Module. The whitelabel checkout and API Integrations are designed to bypass the Webcheckout page.
  • Your logo will also be shown for certain payment methods that use printable vouchers (eg. PagoFacil). Convenient for webshops using the whitelabel checkout and API Integrations.


Paygol module for BoxBilling, version 1.2

 

Requirements

 

Installation

  • Download BoxBilling module.
  • Unzip paygol-for-boxbilling_1.2.zip file directly into your BoxBilling directory.
  • Install your Paygol module using your BoxBilling admin dashboard (Configuration -> Payment Gateways -> New payment gateway), look for “Paygol” and click on “Install“.
  • Once installed, setup the module (Configuration -> Payment Gateways), select “Paygol” and click on Edit Icon (Pencil Icon).
  • 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 BoxBilling site.
  • Copy the “IPN Callback 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.
  • Make sure the module is configured as follows:
    • “Enabled: Yes“.
    • “Allow one time payments: Yes“.
    • “Enable test mode: No
  • Click on “UPDATE” on your BoxBilling site to save the changes.

 

Testing

To test the newly installed module you can enable your service’s test mode clicking the button “Live/Test” at the upper-right corner of your screen in your Paygol’s dashboard website, Be sure to change it back before going live.

 

Paygol button image

To ensure all instances of the Paygol button will work correctly, please follow these instructions:

  • Edit “logos.css” from your BoxBilling installation. This file can be found at “bb-themes/huraga/assets/css/logos.css“.
  • Add the following lines to the end of the file “logos.css“ and save changes:
    .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;
    }
    

Please note:

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

  • Modify the CSS file in the right folder, not inside “huraga“. e.g. “bb-themes/theThemeImUsing/assets/css/logos.css“.
  • Copy the logo image from “bb-themes/huraga/assets/img/gateway_logos/Paygol.png” to a similar path for the other theme.                                            e.g: “bb-themes/theThemeImUsing/assets/img/gateway_logos/Paygol.png“.
  • There’s an alternative way to the previous steps, just rename the folder “huraga” and name it as your new theme folder. This change should be done before you copy the Paygol module to your BoxBilling directory.

 

Important Notes

  • While in test mode, an IPN request (payment notification) will be issued immediately to your platform after each test.
  • Once a payment is completed it will be shown as completed but with “Pending Setup” status, 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). We strongly recommend that you inform your customers about this beforehand in order to avoid confusions.
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