swift – Not getting Razor pay Signature and Order ID in iOS

[ad_1]

Greetings for the day!!!
I’ve built-in code of Razor pay However after added Order_id which i obtained from Net service Response,I’m simply getting Fee Id not getting Razor pay Signature.Thanks in Superior.
right here is my code

var razorpayObj : RazorpayCheckout? = nil
let razorpayKey = ""
razorpayObj = RazorpayCheckout.initWithKey(razorpayKey, andDelegateWithData: self) //RazorpayPaymentCompletionProtocolWithData
let choices: [String:Any] = [
"prefill": [
"contact": "",
"email": ""],
"picture": picture,
"quantity" : quantity, // 100 rs - 1 rs
"identify": identify,
"order_id" : OrderId,
"theme": [
"color": "#01A6F6"
]
]
if let rzp = self.razorpayObj {
rzp.open(choices)
} else {
print("Unable to initialize")
}
extension HomeVC : RazorpayPaymentCompletionProtocolWithData {
func onPaymentError(_ code: Int32, description str: String, andData response: [AnyHashable : Any]?) {
print("error: ", code, str)
self.presentAlertJustMsg(withTitle: "", message: str)
}
func onPaymentSuccess(_ payment_id: String, andData response: [AnyHashable : Any]?) {
print("success: ", payment_id)
print("Response is: ", (String(describing: response)))
let paymentId = response?["razorpay_payment_id"] as! String
let rezorSignature = response?["razorpay_signature"] as! String
print("rezorSignature", rezorSignature)
print(" paymentId", paymentId)
self.presentAlertJustMsg(withTitle: "", message: "Fee Succeeded")
}
}```

[ad_2]

Leave a Reply