Jazzcash PaymentApi
Jazzcash PaymentApi
-----------------
Required Params:
----------------
pp_MerchantID
pp_Password
pp_PaymentToken
pp_TxnRefNo
pp_Amount
pp_TxnCurrency
pp_TxnDateTime
pp_BillReference
pp_Description
pp_TxnExpiryDateTime
-----------------------------------------------------------------------------------
---------------------------
Sample Values:
-------------
paymentUrl:
"https://sandbox.jazzcash.com.pk/ApplicationAPI/API/4.0/purchase/domwallettransacti
onviatoken"
refundUrl:
"https://sandbox.jazzcash.com.pk/ApplicationAPI/API/Purchase/domwalletrefundtransac
tion"
merchantId: "MC59401"
password: "0590e3syzx"
amount: "700"
integritySalt: "049xag15gv"
paymentType: "wallet"
-----------------------------------------------------------------------------------
---------------------------
String generateUniqueTxnRefNo() {
def random = new Random()
def timestamp = Instant.now().toEpochMilli()
def randomNumber = random.nextInt(100)
def uniqueTxnRefNo = "TRN${timestamp}${randomNumber}"
return uniqueTxnRefNo
}
// Generating Hash