@Test public void testReqOfflinePayAsyncSucc() throws Exception { final BCHttpClientUtil.Response response = new BCHttpClientUtil.Response(); response.code = 200; response.content = "{\"result_msg\":\"OK\",\"err_detail\":\"\",\"result_code\":0,\"pay_result\":true}"; PowerMockito.stub(PowerMockito.method(BCHttpClientUtil.class, "httpPost", String.class, Map.class)).toReturn(response); pay.reqOfflinePayAsync(BCReqParams.BCChannelTypes.WX_SCAN, "订单标题", 1, "123456789ABCDE", null, "fakecode", null, "storeid", new BCCallback() { @Override public void done(BCResult result) { Assert.assertTrue(result instanceof BCPayResult); BCPayResult payResult = (BCPayResult) result; Assert.assertEquals(BCPayResult.RESULT_SUCCESS, payResult.getResult()); latch.countDown(); } }); latch.await(2000, TimeUnit.MILLISECONDS); }
public void reqOfflinePayAsync(final BCReqParams.BCChannelTypes channelType, final String billTitle, final Integer billTotalFee, final String billNum, final Map<String, String> optional, final String authCode, final String terminalId, final String storeId, final BCCallback callback) { reqOfflinePayAsync(channelType, billTitle, billTotalFee, billNum, null, null, null, optional, null, authCode, terminalId, storeId, callback); }
BCOfflinePay { public void reqOfflinePayAsync(final BCReqParams.BCChannelTypes channelType, final String billTitle, final Integer billTotalFee, final String billNum, final Map<String, String> optional, final String authCode, final String terminalId, final String storeId, final BCCallback callback) { reqOfflinePayAsync(channelType, billTitle, billTotalFee, billNum, null, null, null, optional, null, authCode, terminalId, storeId, callback); } }
BCOfflinePay { public void reqOfflinePayAsync(final BCReqParams.BCChannelTypes channelType, final String billTitle, final Integer billTotalFee, final String billNum, final Map<String, String> optional, final String authCode, final String terminalId, final String storeId, final BCCallback callback) { reqOfflinePayAsync(channelType, billTitle, billTotalFee, billNum, null, null, null, optional, null, authCode, terminalId, storeId, callback); } private  BCOfflinePay(); }
BCOfflinePay { public void reqOfflinePayAsync(final BCReqParams.BCChannelTypes channelType, final String billTitle, final Integer billTotalFee, final String billNum, final Map<String, String> optional, final String authCode, final String terminalId, final String storeId, final BCCallback callback) { reqOfflinePayAsync(channelType, billTitle, billTotalFee, billNum, null, null, null, optional, null, authCode, terminalId, storeId, callback); } private  BCOfflinePay(); synchronized static BCOfflinePay getInstance(); static Bitmap generateBitmap(String contentsToEncode,
                                        int imageWidth, int imageHeight,
                                        int marginSize, int color, int colorBack); void reqQRCodeAsync(final BCReqParams.BCChannelTypes channelType,
                               final String billTitle, final Integer billTotalFee,
                               final String billNum, final Map<String, String> optional,
                               final Boolean genQRCode, final Integer qrCodeWidth,
                               final BCCallback callback); void reqQRCodeAsync(final PayParams payParam,
                               final BCCallback callback); void reqOfflinePayAsync(final BCReqParams.BCChannelTypes channelType,
                                   final String billTitle, final Integer billTotalFee,
                                   final String billNum, final Map<String, String> optional,
                                   final String authCode, final String terminalId,
                                   final String storeId, final BCCallback callback); void reqOfflinePayAsync(final PayParams payParam, final BCCallback callback); void reqWXNativeQRCodeAsync(final String billTitle, final Integer billTotalFee,
                                       final String billNum, final Map<String, String> optional,
                                       final Boolean genQRCode, final Integer qrCodeWidth,
                                       final BCCallback callback); void reqAliOfflineQRCodeAsync(final String billTitle, final Integer billTotalFee,
                                         final String billNum, final Map<String, String> optional,
                                         final Boolean genQRCode, final Integer qrCodeWidth,
                                         final BCCallback callback); void reqRevertBillAsync(final BCReqParams.BCChannelTypes channelType,
                                   final String billNum,
                                   final BCCallback callback); }
BCOfflinePay { public void reqOfflinePayAsync(final BCReqParams.BCChannelTypes channelType, final String billTitle, final Integer billTotalFee, final String billNum, final Map<String, String> optional, final String authCode, final String terminalId, final String storeId, final BCCallback callback) { reqOfflinePayAsync(channelType, billTitle, billTotalFee, billNum, null, null, null, optional, null, authCode, terminalId, storeId, callback); } private  BCOfflinePay(); synchronized static BCOfflinePay getInstance(); static Bitmap generateBitmap(String contentsToEncode,
                                        int imageWidth, int imageHeight,
                                        int marginSize, int color, int colorBack); void reqQRCodeAsync(final BCReqParams.BCChannelTypes channelType,
                               final String billTitle, final Integer billTotalFee,
                               final String billNum, final Map<String, String> optional,
                               final Boolean genQRCode, final Integer qrCodeWidth,
                               final BCCallback callback); void reqQRCodeAsync(final PayParams payParam,
                               final BCCallback callback); void reqOfflinePayAsync(final BCReqParams.BCChannelTypes channelType,
                                   final String billTitle, final Integer billTotalFee,
                                   final String billNum, final Map<String, String> optional,
                                   final String authCode, final String terminalId,
                                   final String storeId, final BCCallback callback); void reqOfflinePayAsync(final PayParams payParam, final BCCallback callback); void reqWXNativeQRCodeAsync(final String billTitle, final Integer billTotalFee,
                                       final String billNum, final Map<String, String> optional,
                                       final Boolean genQRCode, final Integer qrCodeWidth,
                                       final BCCallback callback); void reqAliOfflineQRCodeAsync(final String billTitle, final Integer billTotalFee,
                                         final String billNum, final Map<String, String> optional,
                                         final Boolean genQRCode, final Integer qrCodeWidth,
                                         final BCCallback callback); void reqRevertBillAsync(final BCReqParams.BCChannelTypes channelType,
                                   final String billNum,
                                   final BCCallback callback);  }