Hello all,
I'm very happy there's such a great developer's community here!
I'm implementing the CIM solution. I've spent a few days going over the sample code and felt that I understood the big picture. I've been able to send an XML request for a profile ID - successfully - and a subsequent XML request for a token apparently successfully; I get a token that looks similar to this (all this output being echoed in the browser window: 5qUQDuuBL4deq6N7W3DBBuSEsA9oPZOY91S6f76p/wS1EU2v8EPQks8kC78FV1qkML3MuWzMO/Cl6b5Fq4hDlcXkG1hb3JC3lbrRgTdPHBRGZf2GQ6tiAqa8TfPkYvap8voN922BncMgP/++pmqtIeVPA3GV9UDmUCHckEcYnha3ytdzvEhZxskcB6/KKen0
I've got a form named "tokenform" which has a hidden field with the token in it, and targets the iframe name. The iframe opens up and displays a message "Powered by Authorize.net" & "Missing or invalid token."
Here's the section of code I think is having an issue:
[code]
<form name="tokenform" target="authnetpopup">
<input type="hidden" name="tokenfield" value=<?php echo htmlspecialchars($token); ?> />
</form>
<iframe id="authnetpopup" name="authnetpopup" src="https://test.authorize.net/profile/manage"></iframe>
[/code]
If someone could point out what must be the obvious, I'd be eternally grateful!
Thanks so much. Looking forward to your assistance!
Solved! Go to Solution.
โ09-25-2012 03:38 PM
I suppose I could try it. It seemed like there was quite a bit of extra fluff in it and I just wanted to strip it down to the basics. But at this point I'm willing to give anything a try. I'll post back later :) Thanks for all the suggestions.
โ09-26-2012 06:50 AM
Now that I'm awake. the problem is that the <form /> is not posting anything, it doesn't have a button, there is no javascript that post the form. So basically, you are just try to open https://test.authorize.net/profile/manage on a iframe which will fail because it not getting any token. Download the sample code and see how it work and change it to work with php.
โ09-26-2012 06:53 AM
It had to be the button since as far as I could see, the js file simply managed the behavior of the popup. However, since I do like the way it makes the popup look I might just keep it. However I'm now getting a new error message: CIM is not enabled, but I'm using the sandbox and everything should be enabled, am I right? At least I'm getting a different error message! I'll doublecheck the API login info.
โ09-26-2012 08:02 AM
There is a line in the examplePage.html
// Uncomment this line to use test.authorize.net instead of secure.authorize.net.
//AuthorizeNetPopup.options.useTestEnvironment = true;
โ09-26-2012 08:05 AM
For some reason it just wasn't working in the sandbox, with or without the test account enabled. I did use the "real" account credentials and that worked just fine. Thanks for working with me on this!!
โ09-26-2012 08:51 AM