cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

AuthorizeNetDPM Form

Hello,

I am new to PHP scripting.

 

When implementing the (DPM) I was interested in passing the name and address information into the credit card request form. i have created a direct_post.php file on the fly for each visitor. It now includes these additional values:

 

AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting, $FName, $LName, $Address, $City, $State, $Zip, $Country);

 

I need assistance with placing these values into the form as a "prefill":

$FName, $LName, $Address, $City, $State, $Zip, $Country

 

1) there might be additional files I need to pass these variables through

2) then what would be the code that will populate the AuthorizeNetDPM.php file?

 

Thanks in advance

markm_ac
Member
2 REPLIES 2

 

Hi,
 
The "directPostDemo" is really only designed to show one example of how a form could be created. As such, it doesn't really have a lot of flexibility and can't do what you are asking without direct modification. I would recommend that you look at the source code behind the demo and create your own similar function that allows you to prepopulate data.

If this is data that you have already collected from the customer, you may also consider sending it using hidden form fields instead of text input boxes.
 
Thanks,
Joy
Joy
Administrator Administrator
Administrator
Hi Joy, Thanks for your reply. I have already passed the values to direct_post.php: ( this is created "on the fly" with the additional values ) $amount = "19.99"; $FName = "Joe"; $LName = "Buyer"; $Address = "1234 Payment Way"; $City = "Las Vegas"; $State = "NV"; $Zip = "89123"; $Country = "US"; AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting, $FName, $LName, $Address, $City, $State, $Zip, $Country); I have 2 questions: 1) where would I configure the script to pass the additional values from AuthorizeNetDPM::directPostDemo( ) Default: url, $api_login_id, $transaction_key, $amount, $md5_setting, Newly added: $FName, $LName, $Address, $City, $State, $Zip, $Country 2) after they are passed to: anet_php_sdk/lib/AuthorizeNetDPM.php what would be the actual php code that would prefill the the text form values for $FName, $LName, $Address, $City, $State, $Zip, $Country? Mark