The eSeller Cloud webshop administration enables you to apply
custom formulas to calculate transaction fees from payment
solutions that are not supported by eSeller Cloud by default. This
tutorial teaches you how to generate a custom transaction fee
formula.
Formulas support the use of conditions, mathematic symbols and
the variable "P", which is a place holder for price/amount. The
input field is case-insensitive.
Mathematic symbols that are supported by formulas are
> "greater than"
< "less than"
= "equal to"
>= "greater than or equal to"
<= "less than or equal to"
() "parentheses"
+ "addition"
- "subtraction"
* "multiplication"
/ "divison"
^ "exponent"
Simple transaction fee formulas consist of calculating a
percentage of the amount or a fixed fee cost independent of the
amount.
According to the Nets transaction costs, the Visa (Danish)
payment method is 1,5% of the amount. The formula corresponding to
this rule is
P * (1,5/100)
According to Nets transaction costs, the Danske Banks Net
payment transaction cost is 2,00 DKK independent of amount. The
formula corresponding to this rule is simply
2
Conditioned formulas
Conditions let you specify rules for when different parts of the
formula should apply. You can use the "if" condition to specify a
statement / several propositions which must be true in order for a
rule to apply.
The structure of a conditioned formula is as following:
If ( this proposition is true ; then this rule will apply ; else if
the proposition is false then this rule will apply )
It is possible to create formulas with several conditions such
as:
If ( this propositions is true ; then this rule will apply ; if
( this proposition is true ; then this rule will apply ; if ( this
proposition is true ; then this rule will apply ; else if none of the
propositions are true then this rule will apply )))
Now we will try to use conditions to translate a transaction
cost into a formula.
As an example, we will use the transaction cost for
Dankort/VISA-Dankort and eDankort payment method. In accordance
with Nets transaction costs, it is stated that the following fee
rules apply:
Price/Amount
|
Transaction fee
|
0,00 - 50,00 DKK
|
0,70 DKK
|
50,01 - 100,00 DKK
|
1,10 DKK
|
Above 100 DKK
|
1,39 DKK
|
These transaction fee rules can be translated into the following
formula:
If ( P <= 50 ; 0,7 ; if ( P <= 100 ; 1,10 ; 1,39 ))
This formula means that:
- If P
(the price/amount) is less than or equal to 50 then the fee should
be 0,70
- If P is
less than or equal to 100 then the fee should be 1,10
- Otherwise the fee should be 1,39
Another example of conditioned formulas can be exemplified with
the JCB Cards transaction fee rule. Transactions cost using Nets is
stated as 3,75% of the amount, however at least 1,95 DKK. This rule
can be formalised as:
If ( P * (3,75/100) < 1,95 ; 1,95 ; P * (3,75/100) )
This formula means that:
- If 3,75%
of P (the price/amount) is less than 1,95 then the fee should be
1,95
- Else if
that condition is not true then the fee should be 3,75% of P.
For more documentation on what is supported by formulas, please
visit
FLEE on Codeplex