Reply
Highlighted
Member
Posts: 1
Registered: ‎05-05-2013

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

Highlighted
Posts: 1,609
Topics: 15
Kudos: 201
Solutions: 121
Registered: ‎06-23-2011

Re: Question about USING the DPM Method

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.