Package com.google.checkout.sdk.domain

Examples of com.google.checkout.sdk.domain.OrderStateChangeNotification


    ByteArrayInputStream error = new ByteArrayInputStream("".getBytes());
    Object object = new TestingApiContext(environment, input, output, error)
        .reportsRequester()
        // the specific number is mocked and doesn't matter, but the parsing _does_...
        .requestNotification("c821426e-7caa-4d51-9b2e-48ef7ecd6423");
    OrderStateChangeNotification oscn = (OrderStateChangeNotification)object;

    assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"
        + "<notification-history-request xmlns=\"http://checkout.google.com/schema/2\">\n"
        + "    <serial-number>c821426e-7caa-4d51-9b2e-48ef7ecd6423</serial-number>\n"
        + "</notification-history-request>\n", output.toString("utf-8"));


    // textually identical to the XML EXAMPLE_NOTIFICATION string.
    assertEquals("841171949013218", oscn.getGoogleOrderNumber());
    assertEquals(FinancialOrderState.CHARGING, oscn.getNewFinancialOrderState());
    assertEquals(FinancialOrderState.CHARGEABLE, oscn.getPreviousFinancialOrderState());
    assertEquals(FulfillmentOrderState.NEW, oscn.getNewFulfillmentOrderState());
    assertEquals(FulfillmentOrderState.NEW, oscn.getPreviousFulfillmentOrderState());
    assertEquals(DATE_STRING, oscn.getTimestamp().toXMLFormat());
  }
View Full Code Here

TOP

Related Classes of com.google.checkout.sdk.domain.OrderStateChangeNotification

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.