I've been instructed to modify my app & I've tried several options without success.
I'm trying right now to start an activity for result (manual sale) with the amount already filled. On success I get the payment from the Intent's Extras. After doing:
Payment payment = data.getParcelableExtra(Intents.EXTRA_PAYMENT); order.setPayType(PayType.SPLIT_CUSTOM); order.setPayments(Collections.singletonList(payment)); orderConnector.updateOrder(order);I receive the following message:
status code: 400 cannot update one or more of these fields: Order{json='{"payments":{"elements":[{"result":"SUCCESS","createdTime":000000,"taxRates":{"elements":[{"id":"UNIQUEID","taxableAmount":200,"taxAmount":0,"rate":0,"isVat":false,"name":"NO_TAX_APPLIED"}]},"offline":false,"id":"UNIQUEID","amount":200,"cashTendered":500,"tipAmount":null,"taxAmount":0,"lineItemPayments":null,"order":{"id":"UNIQUEID"},"tender":{"id":"UNIQUEID","enabled":true,"instructions":null,"visible":true,"labelKey":"com.clover.tender.cash","label":"Cash","opensCashDrawer":true,"editable":false},"employee":{"id":"UNIQUEID"},"externalPaymentId":null,"cashbackAmount":null}]},"payType":"SPLIT_CUSTOM"}', bundle=null, changeLog=null}
- Is it because the manual sale activity already associates that payment with a new order?
- Is there a work around or suggestions to this implementation?
- Can I start the register activity to go straight to payments with a pre-filled amount for this order?
- Is there a way to de-associate or simply associate the payment to a specific order id?