I have been working on a cfc for amazon pay that l...
# cfml-general
m
I have been working on a cfc for amazon pay that leverages their published java package and hit a snag. It is probably because I don't work with java packages very often and am likely hitting something to do with inheritance or something else I haven't learned. Hoping one of y'all can give me some pointers. This is the link to Stack Exchange. Unfortunately I have not found anything CF related that uses Amazon's new API, only legacy stuff and it is not helping much. I REALLY do not want to roll my own CF only solution either, I want to leverage their package. https://stackoverflow.com/questions/72892289/amazon-pay-checkout-java-v2-in-coldfusion-cfc-method-not-found
w
you have:
Copy code
<cfset session.amazonPayClient.getCheckoutSess(url.amazonCheckoutSessionId)>
but it appears the java method is getCheckoutSession. could this be the issue?
m
no, that is the CFC method which I named a bit differently to avoid confusion while I am building it. - It calls the getCheckoutSession of the WebstoreClient.
w
can you paste the getCheckoutSess method
oh nm, i see it
rather than:
Copy code
<cfreturn variables.oClient.getCheckoutSession(checkoutSessionId=arguments.sessionID)>
what happens if you do:
Copy code
<cfreturn variables.oClient.getCheckoutSession(arguments.sessionID)>
or
Copy code
<cfreturn variables.oClient.getCheckoutSession(javacast("string",arguments.sessionID))>
m
That was it (the or), another another basic thing learned about extending java. Thanks again!