Dinger

Payload Example and Redirect URL




Dinger Prebuilt Checkout Form

**BaseUrl ( staging ) - https://prebuilt.dinger.asia
**BaseUrl ( production ) - https://form.dinger.asia


Decryption Code Sample


items = [{ 
name: "Dinger”,  
amount: 1100, 
quantity: 2, 
}] 
** if you want to put ' in json array, you can use this way to make a correct json format or you can replace ' and " characters in your product name before sending to Dinger gateway **
items = `[{\"name\":\"Dinger\\'s\",\"amount\": ${totalAmount},\"quantity\":\"1\"}]`;

data = {     
clientId:"87d9eb64-9d64-35d7-b331-2833b4787770" , 
publicKey:"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC0FeXFG78FHY/o2ekXJJoTxbHTlhrOjteN++EoLrzbwcKq4D4LZL9j1fMl9IEhlgUEo0HIDb871K5loJ8uTEkM27kXVVjv7EPLR0UnEG7blFWfj03FjGjhjyZfPyrFRoC7QvorVRU9TX4y2GyEjgqV+9EWQYZBmOD80dkk/4KsRQIDAQAB" , 
items: items , 
customerName: "Kyaw Kyaw", 
totalAmount: 2200, 
merchantOrderId: merchantOrderId, 
merchantKey: "9e01os1.iyDJia32LW0rE5KXdKfGylg77i8", 
projectName: "Test Shop" , 
merchantName: "Mg Mg" , 
} 

(Remark: items must be stringify) 

transformation algorithm RSA/ECB/PKCS1Padding  

Key to encrypt the request data 

//Key for encryption
keyForEncryption =  MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCFD4IL1suUt/TsJu6zScnvsEdLPuACgBdjX82QQf8NQlFHu2v/84dztaJEyljv3TGPuEgUftpC9OEOuEG29z7z1uOw7c9T/luRhgRrkH7AwOj4U1+eK3T1R+8LVYATtPCkqAAiomkTU+aC5Y2vfMInZMgjX0DdKMctUur8tQtvkwIDAQAB 

encrypteDataWithRsa = rsa(jsonStrigify(data),keyForEncryption)  

encryptedPayload = Base64.getEncoder().encodeToString(encrypteDataWithRsa) 

(Remark: encryptedPayload must be URL Encoded) 

SecretKey <- from merchant portal  

HashValue = encrypt the payload with your secret key by hmac sha256 

Sample Redirect Link – BaseUrl?payload=encryptedPayload&hashValue=hashValue

                                    


Note: Please see and check how will Dinger system invoke to your url with transaction states and your order id in "Revoke Transaction Status to Merchant URL" page.