cancel
Showing results for 
Search instead for 
Did you mean: 

Question about USING the DPM Method

Hey,

 

 I was wondering If i can use the directPostDemo function to process transaction on a live working website. I would just modify the code a little bit. Thanks

eldan88
Member
1 REPLY 1

Sort of.

 

public static function getCreditCardForm($amount, $fp_sequence, $relay_response_url, $api_login_id, $transaction_key, $test_mode = true, $prefill = true)

 As you can see, getCreditCardForm has a $test_mode argument.

 

echo AuthorizeNetDPM::getCreditCardForm($amount, $fp_sequence, $url, $api_login_id, $transaction_key);

 You need to add a $test_mode argument to the end of that call.

 

public static function directPostDemo($url, $api_login_id, $transaction_key, $amount = "0.00", $md5_setting = "")

 Then add a $test_mode argument to the end of this function definition. Now you can call directPostDemo in either test mode or live mode by passing true for test mode or false for live mode.

TJPride
Expert