eWay Rapid API | Post Affiliate Pro

Integrate eWay Rapid API with Post Affiliate Pro for secure, hassle-free online payment processing and seamless affiliate tracking.

eWay Rapid API | Post Affiliate Pro

eWay Rapid API integration

A secure online payment gateway that makes it easy and hassle free for you to accept credit card payments through your website.

Rapid API is a payment product that allows merchants to post credit card data from their customer’s browser directly to eWAY without it passing through the merchant’s server.

The integration method uses API and its custom field Option1 (or Option2 or Option3)

Please follow the integration steps only in case you are sending your customer to a different domain – e.g. asking for credit cart details at domainA.com and redirecting them to domainB.com with a payment result message. Otherwise you can simply use the general solution.

Integration of custom field

The first step is to set custom field Option1 (or the other two in case you already use Option1). To get the needed value, you can use at least two ways – using PHP you can read it from $_COOKIE[‘PAPVisitorId’] or you can use JavaScript method PostAffTracker.writeCookieToCustomField() found in scripts/trackjs.js. In this case you have to remember that it is a JavaScript method, so you have to get the value before sending request to eWay.

Reading response

The second step is to add the sale tracking code to the site defined as RedirectUrl. eWay will send all data there, so you have to process the response there and then use response data in the sale tracker.

PHP example here:

    ...
    $result = $result->GetAccessCodeResultResult;
    ?>
    
    <script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
    <script type="text/javascript">
    	PostAffTracker.setAccountId('Account_ID');
    	PostAffTracker.setVisitorId('<?php echo $result->Option1; ?>');
    	var sale = PostAffTracker.createSale();
    	sale.setTotalCost('<?php echo $result->TotalAmount; ?>');
    	sale.setOrderID('<?php echo $result->InvoiceNumber; ?>');
    	PostAffTracker.register();
    </script>

Rapid 3.0 API

In case you are using new Rapid 3.0 verison, you can follow the same steps above, however if you want to get the Option value from response, you have to use this code:

$result->Options->Option[0]->Value

In case you are using Option2 or Option3, the number in above line has to change. The number is defined as N-1.

This means, for Option1 it is 0, for Option2 it’s 1 and for Option 3 it’s 2. Do not forget to integrate your website with the click tracking code.

Frequently asked questions

What is eWay Rapid API integration?

eWay Rapid API integration allows you to accept credit card payments securely through your website by posting customer data directly to eWAY, bypassing your server, and enabling seamless affiliate tracking with Post Affiliate Pro.

How do I integrate custom fields with eWay Rapid API?

Set the custom field Option1 (or Option2/Option3) using PHP or JavaScript. For PHP, read the value from $_COOKIE['PAPVisitorId']; for JavaScript, use PostAffTracker.writeCookieToCustomField() before sending the request to eWay.

How can I track sales with eWay Rapid API integration?

After payment, add the sale tracking code to your RedirectUrl page. Use the response data from eWay to set visitor ID, total cost, and order ID in the Post Affiliate Pro tracking script.

Does eWay Rapid API support Rapid 3.0?

Yes, if you use Rapid 3.0, retrieve the Option value from response with $result->Options->Option[N-1]->Value, where N corresponds to Option1, Option2, or Option3.

What should I do if I'm sending customers to a different domain for payment?

Follow the integration steps only when redirecting customers to a different domain with the payment result. Otherwise, use the general integration solution provided by Post Affiliate Pro.

Create account for FREE

Experience the power of Post Affiliate Pro with our 1-month free trial. Test our user-friendly affiliate marketing software that comes with exceptional 24/7 support. Discover all the features you need for successful affiliate management today!

You will be in Good Hands!

Join our community of happy clients and provide excellent customer support with Post Affiliate Pro.

Capterra
G2 Crowd
GetApp
Post Affiliate Pro Dashboard - Campaign Manager Interface