Permalink
Browse files

Added taxAmount in PayPalItem

  • Loading branch information...
1 parent d5eaa8a commit beb8930813eec667f3ab2e5e5e20332aed5ebe3a @SebastienAudier SebastienAudier committed Feb 28, 2012
Showing with 12 additions and 1 deletion.
  1. +1 −0 NVPRequest.st
  2. +11 −1 PayPalItem.st
View
@@ -44,6 +44,7 @@ Iliad.ILObject subclass: NVPRequest [
url addParameter: ('L_NUMBER', ((self transaction paypalItems indexOf: each) - 1) printString) value: (self transaction paypalItems indexOf: each).
url addParameter: ('L_NAME', ((self transaction paypalItems indexOf: each) - 1) printString) value: (each name).
url addParameter: ('L_AMT', ((self transaction paypalItems indexOf: each) - 1) printString) value: (each amount printString).
+ url addParameter: ('L_TAXAMT', ((self transaction paypalItems indexOf: each) - 1) printString) value: (each taxAmount printString).
url addParameter: ('L_QTY', ((self transaction paypalItems indexOf: each) - 1) printString) value: (each quantity printString)].
^url
]
View
@@ -1,5 +1,5 @@
Object subclass: PayPalItem [
- | amount quantity name |
+ | amount taxAmount quantity name |
<category: 'PayPal'>
@@ -18,6 +18,16 @@ Object subclass: PayPalItem [
^amount ifNil: [amount := 0]
]
+ taxAmount [
+ <category: 'accessing'>
+ ^taxAmount ifNil: [taxAmount := 0]
+ ]
+
+ taxAmount: aNumber [
+ <category: 'accessing'>
+ taxAmount := aNumber
+ ]
+
amount: aNumber [
<category: 'accessing'>
amount := aNumber

0 comments on commit beb8930

Please sign in to comment.