public static PaymentResponse fromXml(String xml) throws ArsenalPayApiException {
        PaymentResponse paymentResponse = read(xml);
        String status = paymentResponse.getMessage();
        if (! "OK".equalsIgnoreCase(status)) {
            throw translateToException(status);
        }
        return paymentResponse;
    }