class StripeRest {

    private static final Logger LOG = Logger.getLogger(StripeRest.class);

    @POST
    public Object contribute(Contribution contribution) {<FILL_FUNCTION_BODY>}

    private Response getResponse(Response.Status status) {
        Gson gson = new Gson();
        return Response
                .status(status)
                .entity(gson.toJson(new ResponseEntity(status.getStatusCode(),
                        status.getReasonPhrase()))).build();
    }
}

        LOG.debug("Contribution: " + contribution);

        if (contribution == null || TextUtils.isBlank(contribution.getToken())) {
            return getResponse(Response.Status.BAD_REQUEST);
        }

        Stripe.apiKey = "";
        Map<String, Object> params = new HashMap<>();
        params.put("amount", contribution.getAmount());
        params.put("currency", "eur");
        params.put("description", "REST Countries");
        params.put("source", contribution.getToken());

        try {
            Charge.create(params);
        } catch (AuthenticationException | InvalidRequestException | CardException | APIConnectionException | APIException e) {
            LOG.error(e.getMessage(), e);
            return getResponse(Response.Status.BAD_REQUEST);
        }

        return getResponse(Response.Status.ACCEPTED);
    
<no_super_class>