cancel
Showing results for 
Search instead for 
Did you mean: 

Last Four numbers from DPM post

We are submitting auth_captures via DPM.  We also need to be able to allow for the ability to Credit back these captures.  In order to do this it seems that I need to store the Last Four digits of the CC number since this info is required for a CREDIT transaction via AIM.

 

This is all fine except that I am not able to get this information back via our original DPM auth_capture.  When inspecting the SIMResponse object the CardNumber field is empty.  Please advise on how I can get the last four digits of the CC number from a response to a DPM auth_capture post.

 

For instance if I do the following:

var sr = new SIMResponse(Request.Form);

var ccNumber = sr.CardNumber;

 

sr.CardNumber is an empty string.  All of the other properties of sr (InvoiceNumber, Message etc.) seem to have values.

juantoro
Member
2 REPLIES 2

In the source they are using the wrong fieldname

so do

 

var ccNumber =sr.GetValue("x_account_number");

 

RaynorC1emen7
Expert

Sorry, forgot to thank you for answering this.

 

What I ended up having to do was this:

string ccNum = Request.Form.Get("x_account_number");

 

sr.GetValue("x_account_number") didn't return quite the right thing.  Can't remember now what the issue was, but anyway, you got me 90% of the way there.

 

Thanks!