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

Retrieving Merchant Defined Fields from $response (DPM + PHP)

I have a custom merchant defined field called "sub_type" that is submitted along with the customer's credit card information. In the Merchant Email Receipt, "sub_type" is included under "MERCHANT DEFINED" with the correct value, so I am submitting the field correctly. However, I'm not sure how to retrieve this information in the response object ($response = new AuthorizeNetSIM;) that I get after submitting the payment. I've tried using $response->sub_type, like I would for $reponse->first_name, but it doesn't work.

 

I assume I am making a simple error, but I'm not sure what it is. Any help would be much appreciated!

js2393
Member
1 ACCEPTED SOLUTION

Accepted Solutions

If you look in the AuthorizeNetSIM.php in the php SDK

 

public function __construct($api_login_id = false, $md5_setting = false)
...
// Set fields without x_ prefix
        foreach ($_POST as $key => $value) {
            $name = substr($key, 2);
            $this->$name = $value;
        }
...

 I guess you can either add a 2 char prefix or go in and modify the code.

 

 

 

View solution in original post

RaynorC1emen7
Expert
1 REPLY 1

If you look in the AuthorizeNetSIM.php in the php SDK

 

public function __construct($api_login_id = false, $md5_setting = false)
...
// Set fields without x_ prefix
        foreach ($_POST as $key => $value) {
            $name = substr($key, 2);
            $this->$name = $value;
        }
...

 I guess you can either add a 2 char prefix or go in and modify the code.

 

 

 

RaynorC1emen7
Expert