summaryrefslogtreecommitdiffstats
path: root/sandbox/rfeng
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-05-29 00:28:14 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-05-29 00:28:14 +0000
commitb1a12e7d24e358f7c7d3bdc160ab023f13b37bd3 (patch)
tree5f3e277274711ec31100cc8a5a3b58cc5e64151f /sandbox/rfeng
parent674b43581d9e169ea66a527458b35b898caa46a6 (diff)
Fix a few issues in the test app
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@779805 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/rfeng')
-rw-r--r--sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java2
-rw-r--r--sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/creditcard.jsp8
2 files changed, 6 insertions, 4 deletions
diff --git a/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java b/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java
index 014c49f143..591e02e31b 100644
--- a/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java
+++ b/sandbox/rfeng/scatours-creditcard-payment-dosgi-contribution/src/main/java/scatours/payment/creditcard/impl/CreditCardPaymentImpl.java
@@ -63,7 +63,7 @@ public class CreditCardPaymentImpl implements CreditCardPayment {
System.out.println("Credit card is null");
}
- return "SUCCESS: " + UUID.randomUUID();
+ return "SUCCESS: Confirmation Code=" + UUID.randomUUID() + " ($" + amount + ")";
}
private void print(CreditCardDetailsType creditCard) throws JAXBException, PropertyException {
diff --git a/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/creditcard.jsp b/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/creditcard.jsp
index 69409db313..d40f91eabf 100644
--- a/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/creditcard.jsp
+++ b/sandbox/rfeng/scatours-creditcard-payment-web-contribution/src/main/webapp/creditcard.jsp
@@ -43,8 +43,9 @@
</select> <br />
Card Number: <input type="text" name="cardNumber" /><br />
Card Holder: <input type="text" name="cardHolder" /><br />
-Amount: <input type="text" name="amount" /><br />
-<input type="submit" name="charge" value="Charge" /></form>
+Amount (EUR): <input type="text" name="amount" /><br />
+<p>
+<input type="submit" name="charge" value="Submit" /></form>
<%
String c = request.getParameter("charge");
@@ -59,8 +60,9 @@ Amount: <input type="text" name="amount" /><br />
PayerType ccOwner = objectFactory.createPayerType();
ccOwner.setName(request.getParameter("cardHolder"));
ccDetails.setCardOwner(ccOwner);
+ float amount = Float.parseFloat(request.getParameter("amount"));
%>
-<%=service.authorize(ccDetails, 100.0f)%>
+<%=service.authorize(ccDetails, amount)%>
<%
}
%>