FoodBroker project: Extra charge for VISA payments

For your company Instant TakeOut, payments made with VISA cards imply extra costs that the company passes on to the customer. In this section you can enhance the expression you entered for total amount to add extra VISA charges. To do this, use conditionals as shown in the following expression:

if order:\order\payment = "VISA" then
{
   if %amount * 1.05 < 75 then
      %amount * 1.05 * 1.13
   else
      %amount * 1.05 * 1.015
}
else
   %amount * 1.05

This expression charges the customer with a variable rate whenever the payment has been made using a VISA card. The following table describes the decision conditions:

Payment condition Extra charges

not VISA

none

VISA,
order amount including charges
is less than 75

13% of the order total

VISA,
order amount including charges
is more than 75

1.5% of the order total

In that expression, the total amount of the order is used: the contents of variable %amount is read and tested against the different thresholds to select the applicable rate. How to set the value of %amount is described in an upcoming chapter of this book.

To make VISA extra-charges operational, replace the expression bound to the node total in the MR_webToBilling Map.

Replacing the expression bound to the node total

In this graphic, the result of the round function fits into the defined field total.

Related topics

FoodBroker project: Do the first steps

Create a Business Document for the customer request

Create a Business Document for the partner

Create a Business Document for partner rates

Build the Mapping Flow

FoodBroker project: Fill headers

FoodBroker project: Determine the incoming order ID

FoodBroker project: Generate the order ID

FoodBroker project: First steps in filling nodes

FoodBroker project: Extra charge for VISA payments

FoodBroker project: Introduction to data aggregation

FoodBroker project: Collect and copy parts

FoodBroker project: Manage rates

FoodBroker project: Handle absence of partner rates

Related Links