我正在为马来西亚开发一个应用程序,我想在我的代码中实现IPay88 sdk所以请为我提供一个指导,这将是我的日子,我有MERCHANT CODE和MERCHANT KEY,我从下载jar文件this link
答案 0 :(得分:1)
让我们从一步一步的解决方案或指南开始
将jar导入您的代码follow this link
然后在需要实施IpayResultDelegate
后,才能获得付款成功或失败的结果。
public class ResultDelegatePaymentMethod implements IpayResultDelegate, Serializable {
@Override
public void onPaymentSucceeded(String transId, String refNo, String amount, String remarks, String auth) {
Log.e("tag", "onPaymentSucceeded");
}
@Override
public void onPaymentFailed(String transId, String refNo, String amount, String remarks, String err) {
Log.e("tag", "onPaymentFailed");
}
@Override
public void onPaymentCanceled(String transId, String refNo, String amount, String remarks, String err) {
Log.e("tag", "onPaymentCanceled");
}
@Override
public void onRequeryResult(String MerchantCode, String RefNo, String Amount, String Result) {
Log.e("tag", "onRequeryResult");
}}
现在拨打ipay88的意图并传递付款明细
IpayPayment payment = new IpayPayment();
payment.setMerchantKey(CommonKeyword.MERCHANT_KEY);
payment.setMerchantCode(CommonKeyword.MERCHANT_CODE);
payment.setPaymentId("16");//there are many payment id i attach image for it
payment.setCurrency("MYR");
payment.setRefNo("refno010"); //pass string value as a reference
payment.setAmount("1.00"); //amount in MYR
payment.setProdDesc("product desc");//product description
payment.setUserName("username");
payment.setUserEmail("xyz@xyz.com");
payment.setUserContact("06010101011");
payment.setRemark("test");
payment.setCountry("MY");
payment.setBackendPostURL("payment url of backend ex. http://xyz.payment.php");
Intent checkoutIntent = Ipay.getInstance().checkout(payment, MyActivity.this, new ResultDelegatePaymentMethod());
startActivityForResult(checkoutIntent, 1);
finish();
4.参与混淆? - 需要参考Ipay88支付网关的文档。 希望你满意答案。