Last active
December 23, 2015 20:36
-
-
Save allenmichael/28b0907075107b7c2be6 to your computer and use it in GitHub Desktop.
Shipping Arc.js Action Exercise 7-3
This file contains hidden or 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
module.exports = function(context, callback) { | |
try { | |
var firstShippingRatePrice = context.response.body.rates[0].shippingRates[0].amount; | |
context.response.body.rates[0].shippingRates[0].amount = Math.floor(firstShippingRatePrice + (firstShippingRatePrice * 0.25)); | |
} catch(err) { | |
console.error(err); | |
} | |
callback(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment