<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DPM - can't use custom image as submit button? in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/DPM-can-t-use-custom-image-as-submit-button/m-p/27904#M14730</link>
    <description>&lt;P&gt;Over a year later and it appears this bug hasn't been fixed yet in the SDK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my recommendation starting with line 34 of AuthorizeNetSIM.php&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set fields without x_ prefix&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach( $_POST as $key =&amp;gt; $value ){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( substr($key,0, 2) == 'x_' ){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $name = substr($key, 2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $this-&amp;gt;$name = $value;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jul 2012 17:39:15 GMT</pubDate>
    <dc:creator>josh_alj</dc:creator>
    <dc:date>2012-07-12T17:39:15Z</dc:date>
    <item>
      <title>DPM - can't use custom image as submit button?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/DPM-can-t-use-custom-image-as-submit-button/m-p/11848#M7351</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran across a hitch, the fix of which might help others out...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using&amp;nbsp;AuthorizeNetDPM::getCreditCardForm and editing the form in anet_php_sdk/lib/AuthorizeNetDPM.php&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to replace the submit button with a custom image, replacing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;input type="submit" value="BUY" class="buy submit"&amp;gt; with&lt;/P&gt;&lt;P&gt;&amp;lt;input type="image" src="/images/submitpayment.png" width="133" height="27" /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I got an error:&lt;/P&gt;&lt;P&gt;Fatal error: Cannot access empty property in &amp;lt;snip&amp;gt;\anet_php_sdk\lib\AuthorizeNetSIM.php on line 37&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using an image submit produces x=, and y= fields in the $_POST, the code around line37 strips off the (arbitrary) first 2 characters the field name, expecting 'x_', hence the error.&lt;/P&gt;&lt;P&gt;Giving the submit image a name attribute helped, but I got other errors, presumably because of the extra field data. I had to add an exclusion clause to the function to ignore fields prefixed with my image name, and it *seems* to be going through, in test at least.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's after I corrected the other errors in the php sample code of course! Hope this helps someone...&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2011 16:24:29 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/DPM-can-t-use-custom-image-as-submit-button/m-p/11848#M7351</guid>
      <dc:creator>webaria</dc:creator>
      <dc:date>2011-04-08T16:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: DPM - can't use custom image as submit button?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/DPM-can-t-use-custom-image-as-submit-button/m-p/11938#M7391</link>
      <description>&lt;P&gt;Hey there, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the heads up and for the fix. I've forwarded your feedback on to our development teams so they can take a look at what you found. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Michelle&lt;/P&gt;
&lt;P&gt;Developer Community Manager&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2011 21:17:29 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/DPM-can-t-use-custom-image-as-submit-button/m-p/11938#M7391</guid>
      <dc:creator>Michelle</dc:creator>
      <dc:date>2011-04-11T21:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: DPM - can't use custom image as submit button?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/DPM-can-t-use-custom-image-as-submit-button/m-p/27904#M14730</link>
      <description>&lt;P&gt;Over a year later and it appears this bug hasn't been fixed yet in the SDK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my recommendation starting with line 34 of AuthorizeNetSIM.php&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set fields without x_ prefix&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach( $_POST as $key =&amp;gt; $value ){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( substr($key,0, 2) == 'x_' ){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $name = substr($key, 2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $this-&amp;gt;$name = $value;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2012 17:39:15 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/DPM-can-t-use-custom-image-as-submit-button/m-p/27904#M14730</guid>
      <dc:creator>josh_alj</dc:creator>
      <dc:date>2012-07-12T17:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: DPM - can't use custom image as submit button?</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/DPM-can-t-use-custom-image-as-submit-button/m-p/27956#M14754</link>
      <description>&lt;P&gt;Just remove the regular submit button and add an image with a bit of Javascript for submitting the form:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;a href="" onclick="document.forms.&lt;STRONG&gt;myform&lt;/STRONG&gt;.submit(); return false;"&amp;gt;&amp;lt;img src="/images/mysubmitbutton.jpg" width="100" height="30" border="0" alt="Submit"&amp;gt;&amp;lt;/a&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Change myform to the name of your form.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jul 2012 20:44:06 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/DPM-can-t-use-custom-image-as-submit-button/m-p/27956#M14754</guid>
      <dc:creator>TJPride</dc:creator>
      <dc:date>2012-07-15T20:44:06Z</dc:date>
    </item>
  </channel>
</rss>

