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

Payment Service

Reply
Developer
cgrebeld
Posts: 26
Registered: ‎01-06-2013
My Device: Playbook developer
My Carrier: NA
Accepted Solution

Error Id 4010 with payments API

[ Edited ]

Hi,

I have an app which uses the native payments api, I have tested it with 'local mode' and it works ok.  I published it, but now I'm getting an error message when trying to make a purchase:

 

There were problems completing this purchase. Please try again or visit Blackberry App World Support for more information. (Error Id: 4010)

 

The actual error text from paymentservice_event_get_error_text doesn't help much:

"There were problems. Please try again. {4010}"

 

So in a panic, I've pulled the App!  What is this error code?  How can I debug this?

 

The actual call I'm making is:

int res = paymentservice_purchase_request(apProductID, NULL, NULL,
            NULL, NULL, NULL, get_window_group_id(), &mPendingPurchaseRequestId);

 with apProductID being a string representation of the "ID" number from the virtual good details on the vendor portal.

 

The App status is "Approved", and the virtual good status is "Up for Sale".

 

 

Thanks

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

Re: Error Id 4010 with payments API

What device are you testing on and what OS version? How was the app installed (side-loaded, App World, App World sandbox)?

 

When do you get the error? Is it:

As soon as you make the purchase call?

After you enter your BBID information?

etc

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Developer
cgrebeld
Posts: 26
Registered: ‎01-06-2013
My Device: Playbook developer
My Carrier: NA

Re: Error Id 4010 with payments API


gbeukeboom wrote:

What device are you testing on and what OS version?

 

Playbook 2.1.0.1314

 

How was the app installed (side-loaded, App World, App World sandbox)?

 

I get the same error side-loading and downloaded from App World.  The sandbox method brings me to the last released version of the app instead of the most recent draft, so I'm not really sure if that's different from normal app-world install.

 

When do you get the error? Is it:

As soon as you make the purchase call?

After you enter your BBID information?

 

It's after I enter the BBID information, it pinwheels for awhile and then comes back with the error dialog.

 

I don't have a problem using the same device and BBID to initiate a purchase on other published apps.

 

By the way I added some info to a related JIRA issue: https://www.blackberry.com/jira/browse/DOC-50

 

 

 

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

Re: Error Id 4010 with payments API

Yep, that's how I knew to grab this post :smileyhappy:

 

What error do you read out in your app? I haven't ever actually seen a 4010 myself (reported or otherwise)

 

The fact that sideloading produces the same issue is a bit concerning, sideloading does not work with payment services, so it could be an issue with your BBID (even though it works with other devices).

 

Can you send me the ID of your app? I will do some testing.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Developer
cgrebeld
Posts: 26
Registered: ‎01-06-2013
My Device: Playbook developer
My Carrier: NA

Re: Error Id 4010 with payments API


gbeukeboom wrote:

Yep, that's how I knew to grab this post :smileyhappy:

 

What error do you read out in your app? I haven't ever actually seen a 4010 myself (reported or otherwise)

 

The fact that sideloading produces the same issue is a bit concerning, sideloading does not work with payment services, so it could be an issue with your BBID (even though it works with other devices).

 

Can you send me the ID of your app? I will do some testing.


paymentservice_event_get_error_id yields   3

 

paymentservice_event_get_error_text  yields:

 

"There were problems. Please try again. {4010}"

 

My App Id is: 20358814

 

Thanks!

 

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

Re: Error Id 4010 with payments API

I just reproduced the same issue, I will escalate to your Payment Service dev team to investigate and let you know when I hear back. 

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Error Id 4010 with payments API

And btw, havent used it much but the app seems very solid! Any plans on porting to BlackBerry 10?

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
Developer
cgrebeld
Posts: 26
Registered: ‎01-06-2013
My Device: Playbook developer
My Carrier: NA

Re: Error Id 4010 with payments API

Thanks, I eagerly await a fix! We'd like to get some stuff on BB10, but have had some issues with the device we were sent, we're hoping to get that sorted out soon.
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Error Id 4010 with payments API

As an update, the 4010 error is caused by passing empty values for both the content ID and the SKU when attempting to make a purchase. Adding a value was confirmed with this dev (off thread) to resolve the issue.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.