Parameter provided is invalid.(Previously order placed. now getting error)

Hi,
I placed cash and credit card payments 2 days back, the order placed successfully. From the next the order not placing, I have not changed anything and showing this error

{“code”:“INVALID_PARAMETER”,“httpStatus”:400,“message”:“Parameter provided is invalid.”,“developerMessage”:“eq(null) is not allowed. Use isNull() instead”,“requestId”:“5fd9bb94-aa45-4c45-bff2-061d1bd519e6”}

I followed Python code URL: https://github.com/poynt/python-sample/blob/master/src/PoyntAPI.py#L706
FYI: if I add transaction list only getting this error without this order is placing.
Here is the below code for both cash and credit card payments. getting same error for both payments. Can you please help to solve the issue. Thank you…

       Order order = new Order();
        order.items = new List<Item>();
        Item i = new Item();
        i.status = "FULFILLED";
        i.name = "Almond Tart";
        i.unitOfMeasure = "EACH";
        i.unitPrice = 600;
        i.quantity = "2";
        i.sku = "";
        i.tax ="0";
        i.selectedVariants = new List<selectedVariants>();
        selectedVariants s = new selectedVariants();
        s.price = new CurrencyAmount();
        s.price.amount = "300";
        s.price.currency = "USD";
        s.variations = new List<ProductVariation>();
        ProductVariation p = new ProductVariation();
        p.attribute = "1 kg";
        p.values = new List<Value>();
        Value v = new Value();
        v.name = "100";
        p.values.Add(v);
        Value v1 = new Value();
        v1.name = "200";
        p.values.Add(v1);
        s.variations.Add(p);
        i.selectedVariants.Add(s);
        order.items.Add(i);
        Item i1 = new Item();
        i1.status = "FULFILLED";
        i1.name = "TEst2";
        i1.unitOfMeasure = "EACH";
        i1.unitPrice = 800;
        i1.quantity = "1";
        i1.sku = "";
        i1.tax = "0";
        order.items.Add(i1);
        order.amounts = new Amounts();
        order.amounts.taxTotal = "0";
        order.amounts.subTotal = "2000";
        order.amounts.netTotal = "2000";
        order.amounts.discountTotal = "0";
        order.amounts.currency = "USD";
        order.context = new Contexts();
        order.context.source = "WEB";
        order.context.businessId = businessId;
        order.context.storeId =storeid;
        order.context.storeDeviceId = deviceid;
        order.statuses = new Statuses();
        order.statuses.status = "OPENED";
        order.createdAt = "2017-11-20T11:14:44Z";
        order.updatedAt = "2017-11-20T11:14:44Z";

        order.transactions = new List<Transaction>();
        ////////// Cash Payments codes
        Transaction t = new Transaction();
        t.fundingSource = new FundingSource();
        t.fundingSource.type = "CASH";
        t.action = "SALE";
        t.amounts = new Amounts2();
        t.amounts.currency = "USD";
        t.amounts.transactionAmount = "2000";
        t.amounts.orderAmount = "2000";
        t.amounts.tipAmount = "0";
        t.amounts.cashbackAmount = "0";
        order.transactions.Add(t);
        //////////// Credit card Payments Code start
       //Transaction t = new Transaction();
        //t.fundingSource = new FundingSource();
        //t.fundingSource.type = "CREDIT_DEBIT";
        //t.action = "SALE";
        //t.status = "AUTHORIZED";
        //t.amounts = new Amounts2();
        //t.amounts.currency = "USD";
        //t.amounts.transactionAmount = "2000";
        //t.amounts.orderAmount = "2000";
        //t.fundingSource.debit = "";
        //t.fundingSource.card = new Card();
        //t.fundingSource.card.type = "VISA";
        //t.fundingSource.card.status = "ACTIVE";
        //t.fundingSource.card.expirationMonth = 12;
        //t.fundingSource.card.expirationYear = 2017;
        //t.fundingSource.card.number = "4111111111111111";
        //t.fundingSource.entryDetails = new EntryDetails();
        //t.fundingSource.entryDetails.customerPresenceStatus = "PRESENT";
        //t.fundingSource.entryDetails.entryMode = "KEYED";
        //t.fundingSource.verificationData = new VerificationData();
        //t.fundingSource.verificationData.cvData = "123";//CVV  
        //t.contexts = new Context2();
        //t.contexts.storeId = storeid
        //t.contexts.businessId = businessId;
        //t.contexts.businessType = "TEST_MERCHANT";
        //t.contexts.mcc = "";
        //t.contexts.mid = "";
        //t.contexts.tid = "";
        //t.contexts.storeDeviceId = "deviceid
        //t.contexts.source = "WEB";
        //t.contexts.transactionInstruction = "EXTERNALLY_PROCESSED";
        //t.contexts. transmissionAtLocal = "2017-11-20T11:14:44Z";
        //order.transactions.Add(t); 

FYI: If invalid parameter name is mentioned with error then developers can easily understand the issue.

Can you try again now?

Now I tried 2 times. Getting same issue.

Can’t understand what’s wrong with it and suddenly stopped working.

can you please email devsupport@poynt.com with the requestId of your latest attempt?

Please note that you cannot send Card Transactions in this way. Please do not use this API to process transaction.s The Transactions[] list gets filled by Poynt after the payment is processed through Payment Fragment. You have to launch the Payment Fragment on the Poynt Terminal to collect payment.

Can you clarify what use case you are trying to solve ? With regard to the error, you are passing null value for a field, which is invalid - we will get you that field info. But mean while, please let us know what your use cases are ?

Hi Praveen,

Actually my purpose is using API I make orders and transactions because we have both apps and website, when ever user trying to place order through website we need to allow them to make transaction.
Can you please help to solve the issue.

thanks Prasad. So definitely you cannot pass card based transactions through this API. We do not allow that. But for Cash Transaction it’s supposed to work but there is some field value being passed as null that our server is not liking. Also I see that the User-Agent string is also coming as null. Can you fix that ?

Can you start removing transactions, then items to see if you can narrow down which field is causing the error ? I’m waiting for our server team to debug which field it is.

Hi Praveen,

What we need to pass in User-Agent string? I have not found in API documentation.

FYI: Without transaction list the order placed successfully. I am trying to execute at least cash transactions.

use a value that indicates your application name and version so it’s easy to debug/troubleshoot. eg. User-Agent: Application Name / version