Package scatours.customer

Examples of scatours.customer.Customer


    @Property
    protected float transactionFeeRate = 0.01f;

    public String makePaymentMember(String customerId, float amount) {
        Customer customer = null;

        try {
            customer = customerRegistry.getCustomer(customerId);
        } catch (CustomerNotFoundException ex) {
            return "Payment failed due to " + ex.getMessage();
        } catch (Throwable t) {
            return "Payment failed due to system error " + t.getMessage();
        }

        CreditCardDetailsType ccDetails = customer.getCreditCard();

        String status;
        try {
            status = creditCardPayment.authorize(ccDetails, amount);
        } catch (AuthorizeFault_Exception e) {
            status = e.getFaultInfo().getErrorCode();
        }

        StringBuffer body = new StringBuffer();
        body.append(customer);
        body.append("\n").append("Status: ").append(status).append("\n");
        emailGateway.sendEmail("order@tuscanyscatours.com", customer.getEmail(), "Status for your payment", body
            .toString());

        return status;
    }
View Full Code Here

TOP

Related Classes of scatours.customer.Customer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.