Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Runtime Development

Reply
Regular Contributor
jcentricity
Posts: 62
Registered: ‎09-28-2012
My Carrier: Verizon

Re: Debugging Playbook Beta 2.1 In App Purchase (IAP)

Did you watch the video?

I have two videos

http://www.forecastica.com/inAppVideo.mpg
http://www.forecastica.com/inAppVideo2.mpg

When it comes to the purchase my credit card gets charged
but we never get a response from BlackBerry Payment service
with past purchases

The issue in production is that when we issue RESTORE_TRANSACTIONS to verify past purchase the
BlackBerry Payment is service is not returning the purchase.

Same applies to basic purchase of inApp item. In all cases
BlackBerry is not returning an asynchronous response with the
purchases.


Here is code that reads asynchronous responses


public class BillingReceiver extends BroadcastReceiver {

private static final String TAG = "BillingReceiver";

@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
Log.i(TAG, "Received action: " + action);
if (ACTION_PURCHASE_STATE_CHANGED.equals(action)) {
String signedData = intent.getStringExtra(INAPP_SIGNED_DATA);
String signature = intent.getStringExtra(INAPP_SIGNATURE);
purchaseStateChanged(context, signedData, signature);
} else if (ACTION_NOTIFY.equals(action)) {
String notifyId = intent.getStringExtra(NOTIFICATION_ID);
notify(context, notifyId);
} else if (ACTION_RESPONSE_CODE.equals(action)) {
long requestId = intent.getLongExtra(INAPP_REQUEST_ID, -1);
int responseCodeIndex = intent.getIntExtra(INAPP_RESPONSE_CODE, C.ResponseCode.RESULT_ERROR.ordinal());
checkResponseCode(context, requestId, responseCodeIndex);
} else {
Log.e(TAG, "unexpected action: " + action);
}
}

Please have your team read vides
Please use plain text.
Regular Contributor
jcentricity
Posts: 62
Registered: ‎09-28-2012
My Carrier: Verizon

Re: Debugging Playbook Beta 2.1 In App Purchase (IAP)

See code snippet I posed on how we read response.

RESTORE_TRANSACTIONS operation is not working on production BlackBerry Payment always returns no purchases instead of the the actual purchases. I know the purchase was executed because my credit card gets charged. Also purchase action does not work entirely. I make purchase credit card is charged but we never get a response purchase has been made basically same issue where BlackBerry Payment Service is not returning past purchases. So far I have provided following code snippets for : 1. How we read asynchronous response. 2. How we submit Restore Transaction call. Again same code works fine in Google Play. The problem must be with how BlackBerry Paymet service is not return past purchases in production. Your team needs to find out why the BlackBerry Payment Service is production is not returning past purchases for Google IAP calls
Please use plain text.
Regular Contributor
jcentricity
Posts: 62
Registered: ‎09-28-2012
My Carrier: Verizon

Re: Debugging Playbook Beta 2.1 In App Purchase (IAP)

Ok

Please have your team evaluate the code snippets and videos.

This is a critical issue that I would like to work with your team

to resolve.
Please use plain text.
New Developer
ncioara
Posts: 19
Registered: ‎02-14-2013
My Carrier: -

Re: Debugging Playbook Beta 2.1 In App Purchase (IAP)

I've sent you a pm. Please check your inbox.

Please use plain text.
Regular Contributor
jcentricity
Posts: 62
Registered: ‎09-28-2012
My Carrier: Verizon

Re: Debugging Playbook Beta 2.1 In App Purchase (IAP)

I think i poinpointed issue upload new version will keep you posted. we receive signedata with purchase info but signature is null which is ok but then our code is checking for non null signature.
Please use plain text.
Regular Contributor
jcentricity
Posts: 62
Registered: ‎09-28-2012
My Carrier: Verizon

Re: Debugging Playbook Beta 2.1 In App Purchase (IAP)

Go it thanks. Will test tomorrow. There is a portion of the code that only adds purchases we receive from payment service if signature is valid. Removed signature valid code since signature is always null. In theory it should fix issue will let you know results tomorrow.
Please use plain text.
Regular Contributor
jcentricity
Posts: 62
Registered: ‎09-28-2012
My Carrier: Verizon

Re: Debugging Playbook Beta 2.1 In App Purchase (IAP)

inapp issue is resolved app is working in production.

Thanks

Kwame
Please use plain text.
Regular Contributor
jcentricity
Posts: 62
Registered: ‎09-28-2012
My Carrier: Verizon

Re: Debugging Playbook Beta 2.1 In App Purchase (IAP)

There was a check in the code to verify the signature so we removed it and it fixed

 

issue.  Developers need to know that to get Google IAP to work you must remove all checks

 

where you are verify signatures in your code because the signature returned by blackberry will

 

be null.

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Carrier: Bell

Re: Debugging Playbook Beta 2.1 In App Purchase (IAP)


jcentricity wrote:

There was a check in the code to verify the signature so we removed it and it fixed

 

issue.  Developers need to know that to get Google IAP to work you must remove all checks

 

where you are verify signatures in your code because the signature returned by blackberry will

 

be null.


Yes, this was brought up here over 2 months ago:

http://supportforums.blackberry.com/t5/Android-Runtime-Development/Debugging-Playbook-Beta-2-1-In-Ap...

 

And is also documented fairly well on the Android Runtime microsite:

https://developer.blackberry.com/android/apisupport/apisupport_inapp_payments_support.html

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Contributor
varunagp1988
Posts: 42
Registered: ‎11-11-2013
My Carrier: Airtel

Re: Debugging Playbook Beta 2.1 In App Purchase (IAP)

Can you guys please help me to solve BB in -app billing issue with google v2 integration, here is my question http://supportforums.blackberry.com/t5/Android-Runtime-Development/Blackberry-in-app-purchase-not-wo...
Please use plain text.