更新
This commit is contained in:
@@ -143,7 +143,7 @@ public class GoogleFragment extends Fragment {
|
||||
google_params.putString("price", MoneyUsds);
|
||||
google_params.putString("quantity", "1");
|
||||
dis();
|
||||
ToastUtil.show("支付成功");
|
||||
ToastUtil.show(getString(R.string.pay_suc));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -463,14 +463,14 @@ public class MyWalletActivity extends AbsActivity {
|
||||
|
||||
switch (code) {
|
||||
case 60000:
|
||||
ToastUtil.show("支付取消");
|
||||
ToastUtil.show(getString(R.string.pay_cancel));
|
||||
break;
|
||||
case -1:
|
||||
case 60051:
|
||||
ToastUtil.show("支付失败");
|
||||
ToastUtil.show(getString(R.string.pay_fail));
|
||||
break;
|
||||
case 0:
|
||||
ToastUtil.show("支付成功");
|
||||
ToastUtil.show(getString(R.string.pay_suc));
|
||||
inAppPurchaseData = object.getString("inAppPurchaseData");
|
||||
inAppPurchaseDataSignature = object.getString("inAppPurchaseDataSignature");
|
||||
MainHttpUtil.hwNotify(inAppPurchaseData, inAppPurchaseDataSignature, orderId, new HttpCallback() {
|
||||
|
||||
@@ -17,6 +17,7 @@ import android.webkit.WebView;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.facebook.appevents.AppEventsConstants;
|
||||
import com.samsung.android.sdk.iap.lib.helper.HelperDefine;
|
||||
import com.samsung.android.sdk.iap.lib.listener.OnPaymentListener;
|
||||
import com.samsung.android.sdk.iap.lib.vo.ErrorVo;
|
||||
import com.samsung.android.sdk.iap.lib.vo.PurchaseVo;
|
||||
@@ -115,7 +116,7 @@ public class SamsungFragment extends Fragment {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
ToastUtil.show("支付成功");
|
||||
ToastUtil.show(getString(R.string.pay_suc));
|
||||
dis();
|
||||
}
|
||||
}
|
||||
@@ -126,7 +127,11 @@ public class SamsungFragment extends Fragment {
|
||||
payHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ToastUtil.show(_errorVO.getErrorString());
|
||||
if (_errorVO.getErrorCode() == HelperDefine.IAP_PAYMENT_IS_CANCELED) {
|
||||
ToastUtil.show(getString(R.string.pay_cancel));
|
||||
} else {
|
||||
ToastUtil.show(_errorVO.getErrorString());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user