How to use PayOn Library

Sign is a digital signature for verifying the authenticity of digital messages or documents. Only a valid API's sign can be interact with PAYON's server.

Initialize PAYON's Library

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.UAT)// UAT:for TEST,PRODUCTION: production
						.apiKey(YOUR API KEY)
						.merchantId(YOUR MERCHANT ID)
						.termId(YOUR TERMINAL ID)
						.txId(YOUR TRANSACTION ID)
						.amount(YOUR CHECK OUT AMOUNT)
						.currency(YOUR CURRENCY)
						.build();
    }
}

String checkoutURI = checkoutURIBuilder.toCheckoutUrlString()

Get API's Signature

String sign = checkoutURIBuilder.getSign()

Arguments

Last updated