summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sandbox/travelsample/contributions/payment-java-contribution/src/main/java/payment/PaymentImpl.java6
-rw-r--r--sandbox/travelsample/contributions/payment-java-contribution/src/main/resources/payment.composite2
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">