Package com.tuscanyscatours.payment.creditcard

Examples of com.tuscanyscatours.payment.creditcard.CreditCardDetailsType


    public void testCreditCardPayment() {
        SCAClient client = (SCAClient)node;
        CreditCardPayment cc = client.getService(CreditCardPayment.class, "CreditCardPayment");

        ObjectFactory objectFactory = new ObjectFactory();
        CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType();
        ccDetails.setCreditCardType(CreditCardTypeType.fromValue("Visa"));
        PayerType ccOwner = objectFactory.createPayerType();
        ccOwner.setName("Fred");
        ccDetails.setCardOwner(ccOwner);

        try {
            System.out.println(cc.authorize(ccDetails, 100.00f));
        } catch (AuthorizeFault_Exception e) {
            System.err.println("Fault: " + e.getFaultInfo().getErrorCode());
View Full Code Here


    @Init
    public void init() {
        // Load the customers

        CreditCardDetailsType cc = new CreditCardDetailsType();
        PayerType john = new PayerType();
        john.setName("John Smith");
        cc.setCardOwner(john);
        cc.setCreditCardNumber("1111-2222-3333-4444");
        cc.setCreditCardType(CreditCardTypeType.VISA);
        cc.setCVV2("1234");
        cc.setExpMonth(1);
        cc.setExpYear(2012);
        createCustomer("John Smith", "john@xyz.com", cc);
    }
View Full Code Here

    @Init
    public void init() {
        // Load the customers
        ObjectFactory factory = new ObjectFactory();
        CreditCardDetailsType cc = factory.createCreditCardDetailsType();
        PayerType john = factory.createPayerType();
        john.setName("John Smith");
        cc.setCardOwner(john);
        cc.setCreditCardNumber("1111-2222-3333-4444");
        cc.setCreditCardType(CreditCardTypeType.VISA);
        cc.setCVV2("1234");
        cc.setExpMonth(1);
        cc.setExpYear(2012);
        createCustomer("John Smith", "john@xyz.com", cc);
    }
View Full Code Here

    public void testCreditCardPayment() {
        SCAClient client = (SCAClient)node;
        CreditCardPayment cc = client.getService(CreditCardPayment.class, "CreditCardPayment");

        CreditCardPaymentFactory factory = CreditCardPaymentFactory.INSTANCE;
        CreditCardDetailsType ccDetails = factory.createCreditCardDetailsType();
        ccDetails.setCreditCardType("Visa");
        ccDetails.setCreditCardNumber("1111-2222-3333-4444");
        ccDetails.setExpMonth(9);
        ccDetails.setExpYear(2010);
        PayerType ccOwner = factory.createPayerType();
        ccOwner.setName("Fred");
        ccDetails.setCardOwner(ccOwner);

        System.out.println(cc.authorize(ccDetails, 100.00f));
    }
View Full Code Here

    }

    public String makePaymentMember(String customerId, float amount) {

        ObjectFactory objectFactory = new ObjectFactory();
        CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType();
        ccDetails.setCreditCardType(CreditCardTypeType.fromValue("Visa"));
        PayerType ccOwner = objectFactory.createPayerType();
        ccOwner.setName(customerId);
        ccDetails.setCardOwner(ccOwner);

        amount += transactionFee;

        String status = creditCardPayment.authorize(ccDetails, amount);
View Full Code Here

    public void testCreditCardPayment() {
        SCAClient client = (SCAClient)node;
        CreditCardPayment cc = client.getService(CreditCardPayment.class, "CreditCardPayment");

        ObjectFactory objectFactory = new ObjectFactory();
        CreditCardDetailsType ccDetails = objectFactory.createCreditCardDetailsType();
        ccDetails.setCreditCardType(CreditCardTypeType.fromValue("Visa"));
        PayerType ccOwner = objectFactory.createPayerType();
        ccOwner.setName("Fred");
        ccDetails.setCardOwner(ccOwner);

        try {
            System.out.println(cc.authorize(ccDetails, 100.00f));
        } catch (AuthorizeFault_Exception e) {
            System.err.println("Fault: " + e.getFaultInfo().getErrorCode());
View Full Code Here

    @Init
    public void init() {
        // Load the customers
        ObjectFactory factory = new ObjectFactory();
        CreditCardDetailsType cc = factory.createCreditCardDetailsType();
        PayerType john = factory.createPayerType();
        john.setName("John Smith");
        cc.setCardOwner(john);
        cc.setCreditCardNumber("1111-2222-3333-4444");
        cc.setCreditCardType(CreditCardTypeType.VISA);
        cc.setCVV2("1234");
        cc.setExpMonth(1);
        cc.setExpYear(2012);
        createCustomer("John Smith", "john@xyz.com", cc);
    }
View Full Code Here

TOP

Related Classes of com.tuscanyscatours.payment.creditcard.CreditCardDetailsType

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.