Man, Jesse, if I could figure it out, I’d be happier than a pig in shit.
I’ve gone though this thread multiple times and still am so confused:
I’ve played with the exchange rate that will work on small amounts (under 1000) but not for large amount (over 10000) and vice versa. I seem to have remainder of 0.08 Honduran Lempiras (0.0032 USD).
I already have a stored procedure that will insert into AccountTransactions
, AccountTransactionValues
, and Calculations. Like Q was talking about in that thread, we really don’t deal with 1 lempiras. So, anything under 5 should be rounded-off.
In order to execute the stored procedure to add a calculation I first need an identifier for the ticket.
like in Emre’s post about payment integrations, I’d like to be able to get the ticket object as shown here:
function getListOfTicketOrders(ticket) {
// Sample for reading ticket and order data.
// If needed you can use it to read product names, prices, etc.
var orders = ticket.Orders.ToArr(); // ToArray() converts a .net Array to JS Array so we can loop through orders.
var result = '';
var total = 0;
for (i = 0; i < orders.length; i++) {
result = result + orders[i].Quantity // Reading order quantity
+ ' x ' + orders[i].MenuItemName // Reading menu item name
+ ' - ' + ticket.GetExactTotalFor(orders[i]) + '\r'; // Reading order total with discounts & services applied
}
result = result + 'Total: ' + ticket.TotalAmount + '\r'; // Ticket Total
result = result + 'Remaining: ' + ticket.RemainingAmount; // Remaining Total
return result;
}
But I can’t seem to get anything from the ticket object (like ticket.RemainingAmount) when using a payment processor.