google-code-export / google-checkout-java-sdk

Automatically exported from code.google.com/p/google-checkout-java-sdk
1 stars 0 forks source link

NotificationAcknowledgment class lacks Serial Number #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Per the docs at:

http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Notificat
ion_API.html#notification_response_handshake

You should be able to supply the serial number in the acknowledgment.

Instead, the code should look something like:

    protected String getAckString() {
        return getAckString(null);
    }

    protected String getAckString(String serialNumber) {
        Document document = Utils.newEmptyDocument();
        Element root = document.createElementNS(Constants.checkoutNamespace,
"notification-acknowledgment");
        root.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns",
Constants.checkoutNamespace);
        if ( serialNumber != null ) {
            root.setAttribute("serial-number", serialNumber);
        }
        document.appendChild(root);
        return Utils.documentToStringPretty(document);
    }

Original issue reported on code.google.com by bseib.py...@gmail.com on 2 Apr 2009 at 9:43

GoogleCodeExporter commented 9 years ago

Original comment by mihai.io...@gmail.com on 28 Mar 2011 at 11:27