diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-20 15:31:02 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-20 15:31:02 +0000 |
commit | 0514a23af1758840c51b5ff6c64fc7d65588143b (patch) | |
tree | c1ed1580e4bf157e039eac37ae1e4fb0bf8fd81f /sandbox/travelsample/contributions/payment-java-contribution/src/main/java/payment/PaymentImpl.java | |
parent | 4438eb9853cc4311c0cd18170f8a635d6d7b4786 (diff) |
Rename the "transactionFeeRate" to be "transactionFee" as I don't know what the "rate" part means.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@786842 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sandbox/travelsample/contributions/payment-java-contribution/src/main/java/payment/PaymentImpl.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sandbox/travelsample/contributions/payment-java-contribution/src/main/java/payment/PaymentImpl.java b/sandbox/travelsample/contributions/payment-java-contribution/src/main/java/payment/PaymentImpl.java index 071bcf22c2..e3b1d88d4a 100644 --- a/sandbox/travelsample/contributions/payment-java-contribution/src/main/java/payment/PaymentImpl.java +++ b/sandbox/travelsample/contributions/payment-java-contribution/src/main/java/payment/PaymentImpl.java @@ -54,7 +54,7 @@ public class PaymentImpl implements Payment { protected EmailGateway emailGateway;
@Property
- protected float transactionFeeRate = 0.01f;
+ protected float transactionFee = 0.01f;
public String makePaymentMember(String customerId, float amount) {
Customer customer = null;
@@ -68,10 +68,12 @@ public class PaymentImpl implements Payment { }
CreditCardDetailsType ccDetails = customer.getCreditCard();
+
+ float total = amount + transactionFee;
String status;
try {
- status = creditCardPayment.authorize(ccDetails, amount);
+ status = creditCardPayment.authorize(ccDetails, total);
} catch (AuthorizeFault_Exception e) {
status = e.getFaultInfo().getErrorCode();
}
|