Skip to content
This repository has been archived by the owner on Feb 27, 2025. It is now read-only.

PaxDevice in TCP_IP mode gives an ArgumentNullException on timeout #7

Open
jorupp opened this issue Oct 6, 2017 · 0 comments
Open

Comments

@jorupp
Copy link

jorupp commented Oct 6, 2017

Code:

var device = new PaxDevice(new ConnectionConfig
{
    ConnectionMode = ConnectionModes.TCP_IP,
    IpAddress = "X.X.X.X",
    Port = "10009",
    TimeOut = 5000
});
using (device)
{
    var result = device.CreditAuth(0, 11).Execute();
}

Don't do a card-swipe or entry and wait for the 5-second timeout.

Resulting exception:

System.ArgumentNullException: Buffer cannot be null.
Parameter name: buffer
   at System.IO.MemoryStream..ctor(Byte[] buffer, Boolean writable)
   at System.IO.MemoryStream..ctor(Byte[] buffer)
   at SecureSubmit.Terminals.PAX.PaxBaseResponse..ctor(Byte[] buffer, String[] messageIds)
   at SecureSubmit.Terminals.PAX.PaxDeviceResponse..ctor(Byte[] buffer, String[] messageIds)
   at SecureSubmit.Terminals.PAX.CreditResponse..ctor(Byte[] buffer)
   at SecureSubmit.Terminals.PAX.PaxDevice.DoCredit(String txnType, AmountRequest amounts, AccountRequest accounts, TraceRequest trace, AvsRequest avs, CashierSubGroup cashier, CommercialRequest commercial, EcomSubGroup ecom, ExtDataSubGroup extData)
   at SecureSubmit.Terminals.PAX.CreditAuthBuilder.Execute()
   at ApiTest.Program.Main(String[] args) in c:\projects\TOP\ApiTest\ApiTest\Program.cs:line 26

Based on the documentation, I was expecting something inheriting from HpsException with the info, or at least something referencing a timeout.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant