Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Skeleton

  • Loading branch information...
commit ee462eefcb286136cbe39aae7a48b318272e2730 0 parents
Paul McMahon pwim authored
Showing with 13 additions and 0 deletions.
  1. +5 −0 lib/PaypalCalculator.coffee
  2. +8 −0 spec/PaypalCalculator.spec.coffee
5 lib/PaypalCalculator.coffee
@@ -0,0 +1,5 @@
+root = exports ? this
+class root.PaypalCalculator
+ constructor: (@avg_transaction, @transactions) ->
+ @merchant_rate = this.basic_rate
+ basic_rate: 0.036
8 spec/PaypalCalculator.spec.coffee
@@ -0,0 +1,8 @@
+require "coffee-script"
+paypalCalculator = require "../lib/PaypalCalculator"
+
+describe 'paypal calculator', ->
+ it 'should calulater merchant rate', ->
+ calculator = new paypalCalculator.PaypalCalculator(1000, 10)
+ expect(calculator.basic_rate).toEqual 0.036
+ expect(calculator.merchant_rate).toEqual 0.036
Please sign in to comment.
Something went wrong with that request. Please try again.