0

我正在与 Payu Web Checkout 进行集成。放入 post 数据获取 POST,如下所示:

response_code_pol=5
phone=
additional_value=0.00
test=1
transaction_date=2015-05-27 13:07:35
cc_number=************0004
cc_holder=test_buyer
error_code_bank=
billing_country=CO
bank_referenced_name=
description=test_payu_01
administrative_fee_tax=0.00
value=100.00

但我无法使用 Rest Web Service @POST 方法解析数据。

@POST
@Path("/status")
@Produces(ApiConstant.MEDIA_TYPE)
public Response status(
        @FormParam("transaction_date") String transactionDate,
        @FormParam("reference_sale") String referenceSale,
        @FormParam("sign") String sign,
        @FormParam("currency") String currency,
        @FormParam("state_pol") String state,
        @FormParam("extra1") String codigoBarras,
        @FormParam("response_code_pol") int stateCode,
        @FormParam("response_message_pol") int stateDescription,
        @HeaderParam("Host") String host) {

    try {
        Query updateFactura = em.createNativeQuery("UPDATE PAGOS.FACTURA SET ID_ESTADO = 2 WHERE CODIGO_BARRAS = ?1");
        updateFactura.setParameter(1, codigoBarras).executeUpdate();
    }
}

并显示此错误

Error 500: java.lang.IllegalArgumentException
4

0 回答 0