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.
Web
Generate PAYON Checkout Link Plugin
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.
Initialize PAYON Checkout Link's library
JAVA
Copy 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
Copy
<? 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/>" ;
?>
Get Checkout Link
JAVA
Copy String checkoutURI = checkoutURIBuilder . toCheckoutUrlString ()
PHP
Copy <? php
$checkoutURI = $checkoutURIBuilder :: toCheckoutUrlString () ;
?>
Arguments