let paymentParams = PayUPaymentParam(
key: "ibibogames", //Your merchant key for the current environment
transactionId: randomString(length: 6), //Your unique ID for this trasaction
amount: self.amountTextField.text ?? "1", //Amount of transaction
productInfo: "iPhone", // Description of the product
firstName: "Vipin", // First name of the user
phone: "9123456789", // "10 digit phone number here"
surl: "https://payu.herokuapp.com/ios_success", // Success URL. Not used but required due to mandatory check in API.
furl: "https://payu.herokuapp.com/ios_failure", // Failure URL. Not used but required due to mandatory check in API.
environment: .production // Production or Test . Not used but required due to mandatory parameter.
//User defined parameters.
//You can save additional details with each txn if you need them for your business logic.
//You will get these details back in payment response and transaction verify API
//Like, you can add SKUs for which payment is made.
//You can keep all udf fields blank if you do not have any requirement to save your custom txn specific data at PayU's end
paymentParams.udfs = PayUUserDefines()
paymentParams.udfs?.udf1 = ""
paymentParams.udfs?.udf2 = ""
paymentParams.udfs?.udf3 = ""
paymentParams.udfs?.udf4 = ""
paymentParams.udfs?.udf5 = ""
paymentParams.userCredential = "yIlrx4:[email protected]" // "merchantKey:user'sUniqueIdentifier" upi.beneficiaryAccountNumber = accNoTextField.text //for tpv transaction
upi.beneficiaryAccountIFSC = ifscTextField.text//for tpv transaction
paymentParams.paymentOption = upi