Package com.tuscanyscatours.payment.creditcard

Examples of com.tuscanyscatours.payment.creditcard.CreditCardPayment


    }

    @Test
    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


    }

    @Test
    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

    }

    @Test
    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

TOP

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

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.