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.

Explore seamless integrations with Post Affiliate Pro to enhance your affiliate marketing strategies. Discover solutions for e-commerce, email marketing, payments, and more, with easy integrations for platforms like 1&1 E-Shop, 2Checkout, Abicart, and many others. Optimize your affiliate network with these powerful tools.
The leader in Affiliate software
Post Affiliate Pro offers a comprehensive affiliate software platform to manage multiple affiliate programs with ease. Enjoy no setup fees, 24/7 customer support, and a free 1-month trial. Ideal for small and large businesses, it features precise tracking, automated workflows, and customizable tools to boost your affiliate marketing success. Try it now and streamline your affiliate operations effortlessly!
Effortlessly integrate your e-commerce site with Post Affiliate Pro and boost your affiliate program's success. Our expert team ensures seamless integration with your payment processor, handling technical issues along the way. Enjoy a free trial and free integration service, saving you time and maximizing your ROI. Join now and experience top-notch affiliate management with over 500 integration options.
The 9 Best payment processors for affiliate marketing
Discover the 9 best payment processors for affiliate marketing that ensure secure, flexible, and rapid commission payments. Boost your eCommerce sales by selecting a reliable processor to attract top affiliates and enhance your program. Explore our comprehensive guide to choosing the right payment processor for your affiliate marketing success.