3

I'm developing one app for malaysia and I want to implement IPay88 sdk in my code so please provide me a guideline for this, it will be save my days, i have MERCHANT CODE and MERCHANT KEY and i download jar file from this link

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Paras Andani
  • 99
  • 1
  • 6

1 Answers1

1

lets start with step by step solution or guideline

  1. import jar to your code follow this link

  2. then after need to implement IpayResultDelegate , its for get result of payment like payment success, or fail.

    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");
    }}
    
  3. Now Call Intent of ipay88 and pass payments detail

    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.parameters confusion? - need to refer doc of Ipay88 payment gateway.

hope you are satisfy with answers.

Adil
  • 812
  • 1
  • 9
  • 29
  • Are you guys calling this from a webview or something? I am getting "Permission not allow" from mobile device. – chinloong Mar 09 '18 at 15:54
  • 1
    Yes from mobile device you need to import ipay88 sdk – Adil Mar 09 '18 at 16:16
  • Thanks for the info! @Adil – chinloong Mar 10 '18 at 04:26
  • I am getting this issue after trying the above: The webpage at https://uat-mobile-payment.ipay88.com:8243/PaymentGateway/ipay_mobile_in.jsp could not be loaded because : net:: ERR_CACHE_MISS – nr5 Jul 19 '18 at 11:03
  • you implement for web or mobile? – Adil Jul 19 '18 at 11:08
  • I am using Visual Studio 2019. I created the Android binding library from iPay88 SDK .jar file and its dll is referenced in android project. Now it loads the payment selection page in my app. But the callback didn't work. – Thamarai T Oct 04 '21 at 05:30
  • According to [this](https://stackoverflow.com/a/47738531/4574300), it throws error when the callback in Android binding trying to execute my callback as **System.NotSupportedException Message=Unable to activate instance of type myapppackage.Droid.MyCallback from native handle 0xAxyz (key_handle 0xyue736)** – Thamarai T Oct 09 '21 at 08:15
  • @nr5, I too facing the same issue in android mobile application. Any fix for this? – Thamarai T Oct 09 '21 at 08:42
  • I got a solution. I added the missing constructor to my class. Now works fine. Kindly refer [this](https://stackoverflow.com/questions/26573627/no-constructor-found-for-system-intptr-android-runtime-jnihandleownership) and [this](https://stackoverflow.com/questions/10593022/monodroid-error-when-calling-constructor-of-custom-view-twodscrollview/10603714#10603714) – Thamarai T Oct 11 '21 at 07:51