Method not found - Using the GoCardless Java library with ColdFusion -


i trying implement gocardless subscriptions in coldfusion using java library (as per documentation here https://gocardless.com/docs/java/merchant_client_guide#installation-and-setup). quite new using java coldfusion , getting following error:

the newsubscriptionurl method not found - either there no methods specified method name , argument types or newsubscriptionurl method overloaded argument types coldfusion cannot decipher reliably. coldfusion found 0 methods match provided arguments. if java object , verified method exists, use javacast function reduce ambiguity.

the code producing error follows:

<cfset gocardless = createobject("java","gocardless.gocardless")>  <cfset gocardless.environment = gocardless.environment.sandbox>  <cfset gocardless.accountdetails.setappid("my app id")> <cfset gocardless.accountdetails.setappsecret("my app secret")> <cfset gocardless.accountdetails.setaccesstoken("my access token")> <cfset gocardless.accountdetails.setmerchantid("my merchant id")>  <cfset monthlyamount = 35> <cfset subscription = createobject("java","gocardless.connect.subscription").init( gocardless.accountdetails.getmerchantid(), javacast("bigdecimal",monthlyamount), 1, "month" )>  <cfset gocardless.connect.newsubscriptionurl(subscription)> 

my first thought subscription object not of correct type newsubscriptionurl method don't think case because when dump gocardless.connect shows following:

dump of gocardless.connect

this shows first argument passed newsubscriptionurl method should of class gocardless.connect.subscription.

when dump subscription object shows indeed case:

dump of gocardless.connect

like new using java coldfusion don't know might causing issue , whether code have far written correct. appreciated.

thanks, michael.

the method's signature this:

newsubscriptionurl(subscription, string, string, string) 

however calling as:

newsubscriptionurl(subscription) 

hence error message. need make sure call method it's intended.


Comments