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 | |
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 'sandbox/travelsample/contributions/payment-java-contribution')
2 files changed, 5 insertions, 3 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();
}
diff --git a/sandbox/travelsample/contributions/payment-java-contribution/src/main/resources/payment.composite b/sandbox/travelsample/contributions/payment-java-contribution/src/main/resources/payment.composite index 53fcefc241..45c802ed31 100644 --- a/sandbox/travelsample/contributions/payment-java-contribution/src/main/resources/payment.composite +++ b/sandbox/travelsample/contributions/payment-java-contribution/src/main/resources/payment.composite @@ -33,7 +33,7 @@ <binding.ws uri="http://localhost:8082/CreditCardPayment"/>
</reference>
<reference name="emailGateway" target="EmailGatewayComponent"/>
- <property name="transactionFeeRate">0.02</property>
+ <property name="transactionFee">0.02</property>
</component>
<component name="CustomerRegistryComponent">
|