Created
November 28, 2014 16:20
-
-
Save ramanathanrv/d346f328c9f327e3d87f to your computer and use it in GitHub Desktop.
Code for deciding gateway priority.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// available variables order, txn, payment | |
def priorities = ["HDFC", "ICICI"] // default | |
if (payment.card_issuer == "ICICI Bank") { // if ICICI Bank card, use ICICI | |
priorities = ["ICICI", "HDFC"] | |
} | |
else if (order.udf1 == "mobile" && order.udf2 == "android") // for android transactions, use ICICI | |
priorities = ["ICICI","HDFC"] | |
} | |
setGatewayPriority(priorities) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment