From efbe10d638749023e99ede390e6a4c38b791f18f Mon Sep 17 00:00:00 2001 From: slaws Date: Thu, 9 Jul 2009 20:56:27 +0000 Subject: Add property to component git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@792687 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/payment/PaymentImpl.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sandbox/travelsample/contributions/payment-spring-contribution/src/main/java/payment') diff --git a/sandbox/travelsample/contributions/payment-spring-contribution/src/main/java/payment/PaymentImpl.java b/sandbox/travelsample/contributions/payment-spring-contribution/src/main/java/payment/PaymentImpl.java index 48f829ae0f..d3bcb94053 100644 --- a/sandbox/travelsample/contributions/payment-spring-contribution/src/main/java/payment/PaymentImpl.java +++ b/sandbox/travelsample/contributions/payment-spring-contribution/src/main/java/payment/PaymentImpl.java @@ -31,6 +31,7 @@ public class PaymentImpl implements Payment { private CreditCardPayment creditCardPayment; private EmailGateway emailGateway; + private float transactionFee; public void setCreditCardPayment(CreditCardPayment creditCardPayment) { this.creditCardPayment = creditCardPayment; @@ -40,6 +41,10 @@ public class PaymentImpl implements Payment { this.emailGateway = emailGateway; } + public void setTransactionFee(Float transactionFee) { + this.transactionFee = transactionFee; + } + public String makePaymentMember(String customerId, float amount) { ObjectFactory objectFactory = new ObjectFactory(); @@ -49,6 +54,8 @@ public class PaymentImpl implements Payment { ccOwner.setName(customerId); ccDetails.setCardOwner(ccOwner); + amount += transactionFee; + String status = creditCardPayment.authorize(ccDetails, amount); scatours.emailgateway.ObjectFactory emailFactory = new scatours.emailgateway.ObjectFactory(); -- cgit v1.2.3