cancel
Showing results for 
Search instead for 
Did you mean: 

Stuck in the early stages - Direct Post Method (DPM)

I went through all the sample code, etc and i'm obviously missing something, so I apologize in advance for htis question.

 

Since my site doesn't have ssl I'm using the Direct Post Method (DPM)

 

It's a simple php site where users add items ot their cart, enter the shipping addres and land on a review page where they see the shipping tax, grand total. Using the sample code I found for DPM it looks like all I can do is pass the amount of the transaction -  what I need to do is pass all the order info so I can send a confirmation email and add the info to our order database. It's fine if it's all added to the querystring, but I can't figure out how to add extra variables to the form. Currently I get this url response :

 

www...com/direct_post.php?response_code=1&transaction_id=2206872712

 

and what I'd like to have is:

 

www...com/direct_post.php?response_code=1&transaction_id=2206872712&orderid=123

 

so I can reference the pending order in the database

 

Or if there's another method I should use I'm all ears. 

 

Thanks!

 

 

RalphSimmons1
Member
1 REPLY 1

Also, how do I get real customer info to populate?

 

This is all the code I have

 

<?php
require_once 'anet_php_sdk/AuthorizeNet.php'; // The SDK
$url = "http://YOUR_DOMAIN.com/direct_post.php";
$api_login_id = 'YOUR_API_LOGIN_ID';
$transaction_key = 'YOUR_TRANSACTION_KEY';
$md5_setting = 'YOUR_API_LOGIN_ID'; // Your MD5 Setting
$amount = "5.99";
AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting);
?>

 

and it adds defaults for name, address cc number, etc

 

I'm sure tihs is very basic and I've overlooked somethign obvious, but I'm racking my brain trying to find the answer... Thanks

RalphSimmons1
Member