Indentation has been fixed. In the code, credential3 is the secret key. credential2 is for the mid(merchant identifier) and credential4 is for the merchant name. we need both the merchant name and the merchant identifier to process the payment.