Reply
Member
Posts: 6
Registered: ‎02-06-2013

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.

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Last Four numbers from DPM post

In the source they are using the wrong fieldname

so do

 

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

 

Member
Posts: 6
Registered: ‎02-06-2013

Re: Last Four numbers from DPM post

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!