I'm testing google's in-app billing. I follow the instruction of google in-app billing training, using the IabHelper.
I setup the IabHelper successfully.
mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {
public void onIabSetupFinished(IabResult result) {
Log.d("GooglePay", "Setup finished.");
if (!result.isSuccess()) {
// Oh no, there was a problem.
Log.d("GooglePay", "Problem setting up in-app billing: " + result);
return;
}
// Have we been disposed of in the meantime? If so, quit.
if (mHelper == null) return;
mBroadcastReceiver = new IabBroadcastReceiver(GooglePayPlugin.this);
IntentFilter broadcastFilter = new IntentFilter(IabBroadcastReceiver.ACTION);
mActivity.registerReceiver(mBroadcastReceiver, broadcastFilter);
}
});
Then, I call the purchase API of IabHelper.
try {
mHelper.launchPurchaseFlow(mActivity, productID, RC_REQUEST,
mPurchaseFinishedListener, payload);
} catch (IabAsyncInProgressException e) {
Log.d("GooglePay", "Error launching purchase flow. Another async operation in progress.");
}
But, I always got a popup windows says: "从服务器检索信息时出错。[DF-DFERH-01]", as the following picture.
The logcat information is in attated.
I solved this issue eventually, put my answer here, hope it help those who met the same problem like me.
mHelper.launchPurchaseFlow(mActivity, productID, RC_REQUEST, mPurchaseFinishedListener, payload);
The "payLoad" parameter is too long, I set the payload to empty string, then the problem is sloved, no more df-dferh-01.
It's nothing to do with the VPN, nothing to do with the google library, just because the payload is too long for google play service interface.