Page 1 of 2

Getting error in __performParameterSubstitutions function in appery.js

Posted: Wed Oct 01, 2014 5:23 am
by Jignesh

Hello,

appery.js gives error in __performParameterSubstitutions when parameter value is integer. because it uses "value.replace()" function which is not supported for integer value.
Please find attached screenshot for more clarity.

Can you please provide a solution ? It has stopped the payment functionality in my app.

Please do needful.

Thanks
Jignesh Image


Getting error in __performParameterSubstitutions function in appery.js

Posted: Wed Oct 01, 2014 10:45 am
by Kateryna Grynko

Hi Jignesh,

If I understand you correctly, you map a field for sending request, right? If yes, you could try converting values to string before substitution to parameter, as replace is called for all Query String parameters.


Getting error in __performParameterSubstitutions function in appery.js

Posted: Wed Oct 01, 2014 6:53 pm
by Jignesh

I have tried to convert to string but did not get success. It automatically being converted to integer. I think appery should allow integer value also in this functionality.


Getting error in __performParameterSubstitutions function in appery.js

Posted: Thu Oct 02, 2014 6:45 am
by Kateryna Grynko

Hi Jignesh,

Could you please share the app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and post steps to reproduce?


Getting error in __performParameterSubstitutions function in appery.js

Posted: Thu Oct 02, 2014 11:06 am
by Shawn

Hi Kateryna

Just to add more clarity to this issue.
This error started coming up after platform upgrade.
Before that our Stripe Payment page was working fine.
The value being set into the Stripe payment screen is coming from Local Storage.
Jignesh will share the App with you'll on Email.

Rgds
Shawn


Getting error in __performParameterSubstitutions function in appery.js

Posted: Thu Oct 02, 2014 11:56 am
by Kateryna Grynko

Hi Shawn,

Thank you, Jignesh sent everything. We'll check.


Getting error in __performParameterSubstitutions function in appery.js

Posted: Thu Oct 02, 2014 5:53 pm
by Evgene Karachevtsev

Hello,

When you map 'amount' value for the service request query (paymentDS, Before send event) you should convert it to string, this will fix your problem.


Getting error in __performParameterSubstitutions function in appery.js

Posted: Thu Oct 02, 2014 5:55 pm
by Shawn

hi evgene what function can I use to convert it to string ?
or if you can send a screenshot that would be great.


Getting error in __performParameterSubstitutions function in appery.js

Posted: Thu Oct 02, 2014 6:04 pm
by Shawn

hi evgene ok I got it. I just added this and it seems to be working

return Math.floor(value*100)+"";


Getting error in __performParameterSubstitutions function in appery.js

Posted: Thu Oct 02, 2014 6:09 pm
by Shawn

should I add something like this when mapping amount ?

return Math.floor(value*100)+"";