Closed rajmaxi closed 3 years ago
You are passing string that not to be converted into JSON. Please check your config.
Im facing the same problem. @Vaibhavshyoran Can you please tell which string are you talking about?
Im facing the same problem. Can you please tell which string are you talking about?
Can you please share your code snippet?
@Vaibhavshyoran Here is the sample code:
let payUPaymentParams = {
key: 'key',
transactionId: 'payu123',
amount: "1",
productInfo: 'bueno-loan-repayment',
firstName: 'sujit',
email: 'sujit@ajency.in',
phone: '9988776655',
android_surl: 'https://test.in.success',
android_furl: 'https://test.in/failure',
environment: "1",
userCredential: 'aj-sujit',
additionalParam: {
"payment_related_details_for_mobile_sdk": "hash",
"vas_for_mobile_sdk": "hash",
"payment": "hash"
}
}
var payUCheckoutProConfig = {
merchantName: 'Bueno Finance',
showExitConfirmationOnCheckoutScreen: true,
showExitConfirmationOnPaymentScreen: true,
surePayCount: 0,
merchantResponseTimeout: 50000,
autoSelectOtp: true,
// Android specific property
autoApprove: true,
merchantSMSPermission: true,
showCbToolbar: true,
}
let paymentObject = {
payUPaymentParams: payUPaymentParams,
payUCheckoutProConfig: payUCheckoutProConfig
}
PayUBizSdk.openCheckoutScreen(paymentObject);
@rajmaxi is your issue resolved?
@Vaibhavshyoran Here is the sample code:
let payUPaymentParams = { key: 'key', transactionId: 'payu123', amount: "1", productInfo: 'bueno-loan-repayment', firstName: 'sujit', email: 'sujit@ajency.in', phone: '9988776655', android_surl: 'https://test.in.success', android_furl: 'https://test.in/failure', environment: "1", userCredential: 'aj-sujit', additionalParam: { "payment_related_details_for_mobile_sdk": "hash", "vas_for_mobile_sdk": "hash", "payment": "hash" } } var payUCheckoutProConfig = { merchantName: 'Bueno Finance', showExitConfirmationOnCheckoutScreen: true, showExitConfirmationOnPaymentScreen: true, surePayCount: 0, merchantResponseTimeout: 50000, autoSelectOtp: true, // Android specific property autoApprove: true, merchantSMSPermission: true, showCbToolbar: true, } let paymentObject = { payUPaymentParams: payUPaymentParams, payUCheckoutProConfig: payUCheckoutProConfig } PayUBizSdk.openCheckoutScreen(paymentObject);
Pleae double check your hash send function to the SDK sendBackHash = (hashName, hashData) => { console.log(hashName); var hashValue = this.calculateHash(hashData); var result = { [hashName]: hashValue }; console.log(result); PayUBizSdk.hashGenerated(result); }
I think you are sending result as a string.
@Vaibhavshyoran generateHash event is not getting triggered. onError event gets triggered with this error - {"errorCode": "5014", "errorMsg": "Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject"}
Issue is resolved. Was facing the issue because of wrong key.
@sujitgawas19 can explain how you fixed this error I am facing the same.
The key and the salt which i was using was incorrect. Got proper key and the salt from the PayU team.
@sujitgawas19 Yes, I was using wrong key it was 5 character length, later found it is usually 6 character long. now got fixed.
can anyone tell me how to use this module? i am almost fucked up. spent 8 Hours
can anyone tell me how to use this module? i am almost fucked up. spent 8 Hour Stucked were ??
can anyone tell me how to use this module? i am almost fucked up. spent 8 Hour Stucked were ??
Thanks for Reply i resolved i found a documentation link https://github.com/payu-intrepos/payu-non-seamless-react/issues/5
Hi, Iam also getting the same error
{"errorCode": "5014", "errorMsg": "Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject"}
kindly resolve this..