Generate Checkout Link

PAYON Checkout Link is a simple Internet payment system created for websites and apps to collect payment directly. Customer only have to enter their credit/debit card or online banking/e-wallet details.

For integration with PAYON, a merchant will be provided with PAYON's library for generate checkout Link Plugin to embed to merchant's checkout site.

JAVA

import com.payon.pg.aggregator.ecommerce.gateway.client.CheckoutURIBuilder;
import com.payon.pg.aggregator.ecommerce.gateway.client.CheckoutURIBuilder.Environment;

public class OrderController {

public static void main(String[] args) throws IOException, InterruptedException {


CheckoutURIBuilder checkoutURIBuilder = CheckoutURIBuilder.builder()
						.env(Environment.TEST)// TEST:for TEST's environment,PRODUCTION: production
						.apiKey(YOUR API KEY)
						.merchantId(YOUR MERCHANT ID)
						.termId(YOUR TERMINAL ID)
						.txId(YOUR TRANSACTION ID)
						.amount(YOUR CHECK OUT AMOUNT)
						.description(YOUR ORDER DESCRIPTION)
	                                        .sellerId(YOUR SELLER ID)
			                        .buyerId(YOUR BUYER ID)
						.currency(YOUR CURRENCY)
						.build();
			}

}

PHP


	<?php
		require_once('CheckoutURIBuilder.php');
		$lang        = "en";
		$merchantId  = "YOUR MERCHANT ID";
		$termId      = "YOUR TERM ID";
		$amount      = "YOUR CHECK OUT AMOUNT";
		$txId        = "YOUR TRANSACTION ID";
		$currency    = "YOUR CURRENCY";
		$buyerId    = "YOUR BUYER ID";
		$sellerId    = "YOUR SELLER ID";
		$description    = "YOUR DESCRIPTION";
		$apiKey        = "YOUR API KEY";
		$checkoutURIBuilder = new CheckoutURIBuilder($lang, $merchantId, $termId, $txId, $amount, $currency, $redirectUri, $apiKey,$buyerId,$sellerId,$description);
		$env = new Environment();
		// get test url function $env::getTestUrl() and get real url function $env::getRealUrl()
		$url = $checkoutURIBuilder->toCheckoutUrlString();
		echo "<a href='".$url."'>".$url."<br/>";
	
?>
	

JAVA

String checkoutURI = checkoutURIBuilder.toCheckoutUrlString()

PHP

 <?php
     $checkoutURI = $checkoutURIBuilder::toCheckoutUrlString();
 ?>

Arguments

environment mode(TEST,PRODUCTION)

Y

env

Merchant's API key, will provided after merchant registration.

Y

apiKey

Merchant's terminal identification

Y

termId

Merchant's identification

Y

merchantId

Total amount to be checkout

Y

amount

Currency code (KHR, USD)

Y

currency

Order Description

O

description

Buyer's identification

O

buyerId

Seller's identification

O

sellerId

PAYON,CREDIT_DEBIT,PPCBANK_TRANSFER

O

paymentMethod

Last updated