–Hidden comment

Use attributes in format region_from and region_to= to change the languages showing in language switcher.
Available regions are:
europe_from europe_to
asia_from asia_to
mideast_from mideast_to
america_from america_to

Example:
europe_from=0 europe_to=22 will put all languages (ordered in language switcher settings) from 1 to 21 to Europe region:
asia_from=22 asia_to=25 will put all languages from 23 to 24 (so only 2) into Asia region.

GoPay

This integration method integrates webpage defined in successURL parameter. Using Post Affiliate Pro API you can register a commission.

SuccessURL parameter setting

If you are already using successURL please continue with step 2.

If you do not use successURL parameter in your payment form/link you have to add it. If you do this, you have to modify the script which creates encryptedSignature for you, so it includes successURL too. The form line of code should look like this:

<input name="paymentCommand.successURL" value="http://www.yourshop.com/success" />

Sending special data with successURL

To successfully integrate GoPay you have to add a GET parameter with affiliate cookie value to the successURL parameter. You have to do this before encryptedSignature is created, as it would not match with the original successURL.

If your successURL look like this: ‘http://www.yourshop.com/thanks.php’
the modified one have to look like this: ‘http://www.yourshop.com/thanks.php?custom=

You have to set value of GET parameter ‘custom‘ with value of cookie PAPVisitorId. You can do it e.g. using PHP $_COOKIE superglobal variable.

The final link should look like this:
http://www.yourshop.com/thanks.php?custom=0c47be0634f3cd4331a8ede00qrpDxEg
or with predefined account:
http://www.yourshop.com/thanks.php?custom=default10c47be0634f3cd4331a8ede00qrpDxEg

Registering sale commission

Last step is registration of sale commission. In your successURL file, at the place where you check if the transaction was paid successfully (GopaySoap::isEshopPaymentDone) you have to add our API code for creating a commission.
If the transaction is OK (opayHelper::PAYMENT_DONE), you have to load the transaction details and use it for the commission.

Here is an example API code:

<?php
include_once('PapApi.class.php'); // path to your PAP4 API file

$saleTracker = new Pap_Api_SaleTracker('https://URL_TO_PostAffiliatePro/scripts/sale.php');

$saleTracker->setAccountId('Account_ID');
$saleTracker->setVisitorId(substr($_GET['custom'],-32));

$sale = $saleTracker->createSale();
$sale->setTotalCost($order->total); // $order is supposed to be your shop variable
$sale->setOrderID($_GET['variableSymbol']);
$sale->setProductID($order->prodId);

$saleTracker->register();
Back to Integrations Create account for FREE

Our website uses cookies. By continuing we assume your permission to deploy cookies as detailed in our privacy and cookies policy.

×

Schedule a one-on-one call and discover how Post Affiliate Pro can benefit your business.

We’re available on multiple dates

Schedule a call