question

Bryanne Vega avatar image
Bryanne Vega asked Raymond Lee Deactivated commented

Payment & Order Association

Greetings,

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}

  1. Is it because the manual sale activity already associates that payment with a new order?
  2. Is there a work around or suggestions to this implementation?
  3. Can I start the register activity to go straight to payments with a pre-filled amount for this order?
  4. Is there a way to de-associate or simply associate the payment to a specific order id?
Thank you!





OrdersClover Android SDK
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Bryanne Vega avatar image Bryanne Vega commented ·

Extra details:

  • Secure Payment Doesn't Work, It won't allow cash or other tenders
  • Manual sale (ACTION_MANUAL_PAY) won't work, I figure the payment being made is automatically associated with a new order for it to be attached.
    • Also you can't add the order ID as a param (unless it's not documented).
  • V1 Active Pay order only allows an order ID to be passed

The goal: App needs the order to meet a minimum amount paid of the order so it can proceed it's logic & I can't get it approved unless I make it do so without having the merchant going back and forth between tenders & payments.

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community