I have browsed around in the community and documentation about how to add custom line item in the receipt, But all I can found is the piece of code of how to add them. something like
But I've never found any complete source code to understand where should I put this codes. I tried to put it in AsyncTask onPostExecute and it return something like cannot execute in thread UI. And then I tried to add it on doInBackground inside the try catch but it return something like status 400 Order {some json info}
I am totally clueless right now. can someone help me? thank youuu
LineItem line = new LineItem(); line.setName("My Custom Line Item"); line.setPrice(Long.valueOf(200)); orderConnector.addCustomLineItem(mOrder.getId(), line, false);
But I've never found any complete source code to understand where should I put this codes. I tried to put it in AsyncTask onPostExecute and it return something like cannot execute in thread UI. And then I tried to add it on doInBackground inside the try catch but it return something like status 400 Order {some json info}
I am totally clueless right now. can someone help me? thank youuu