Selling digital BlackBerry 10 goodsGetting rich with sleeping
What’s the goal?+ + =
Time is Money!Time is money. Most business people know that for a fact, but still have ahard time getting out of bed in th...
Time is Money!
Setting up the payment serviceImport the Payment Service classesAdd the following to your .pro fileLIBS += -lbbplatform
Setting up the payment service (II)You can now use the Payment Service classes!But what to do with these?#include <bb/plat...
Connecting with the Payment ServiceWhat if I don’t?You may lose some money and sponsor BlackBerry.Static method, so affect...
And we’re just getting started!PaymentManager* m_paymentManager = new PaymentManager(this);
Some UI stuffSet the window group ID of the PaymentManagerNow it can show dialog boxes!const QString windowGroupId =    bb...
Some UI stuff (II)Dialog box shows banner with the application name and icon (production)m_paymentManager->setApplicationN...
Time to buy some stuffrequestPurchase(id, sku)PurchaseReply::finishedSIGNALreply->isFinished()reply->isError()-reply->purch...
Time to buy some stuffrequestPurchase(id, sku)PurchaseReply::finishedSIGNALreply->isFinished()reply->isError()-reply->purch...
Momentics time!<INSERT CODE HERE>
Great, but how do you test?Two options:Test connectionBlackBerry World sandboxPaymentManager::setConnectionMode(PaymentCon...
Test connection<INSERT DEMO HERE>
BlackBerry World sandboxAdd the user in the sandboxCreate an app draft (yes, you have to create an app icon)Add the goodsA...
BlackBerry World sandbox (II)
Types of in-app goods’ licensesNon-consumableConsumable7-day subscriptiontrial option available30-day subscription
BlackBerry World sandbox (III)<INSERT DEMO HERE>29898887
What else is out there?Methods to check for previous purchasesvoid MyPaymentApp::getExistingPurchases(bool refresh){    //...
What else is out there? (II)Manage subscriptions...void MyPaymentApp::checkSubscriptionStatus(const QString &id,          ...
Questions?
Upcoming SlideShare
Loading in …5
×

In-app purchases for BlackBerry 10

1,540 views
1,347 views

Published on

A small presentation about the basics of handling in-app purchases on the new BlackBerry 10 platform.

Published in: Technology, Business
1 Comment
0 Likes
Statistics
Notes
  • Hi
    I am new to Blackberry 10 cascades. In my current app I need to make InApp subscriptions. I am unaware of how to achive this BB 10.

    But I have Integrated the BB 10 Payment Service sample from the link https://developer.blackberry.com/native/sampleapps/ to my current working App. I have also tested the payment in both Testing and Production mode by invoking

    PaymentManager::setConnectionMode(PaymentConnectionMode::Test);
    PaymentManager::setConnectionMode(PaymentConnectionMode:: Production);
    function call from main.cpp.

    and It is working fine.
    now my question are
    1. How to make In app Subscriptions for monthly renewals for BB 10 ? Does the same code work? Do I need to change any modifications in my cuurent Integrated code?
    Button {

    text: qsTr('InAPP') + Retranslate.onLanguageChanged //??? ?????? ????
    layoutProperties: StackLayoutProperties {

    }
    verticalAlignment: VerticalAlignment.Bottom
    horizontalAlignment: HorizontalAlignment.Center

    onClicked: {

    paymentControl.sku = 'ABCD XYZ'
    paymentControl.getPrice(paymentControl.sku)
    paymentControl.purchase(paymentControl.sku)

    }

    }
    2. If Subscriptions for monthly renewals are done how the merchant knows about his/her monthly renewals automatically. Is there any Purchase Status API (for Android ) like API for BB 10 also.
    3.I want to make service call on As soon as subscription Expired automatically. How my app know if the subscription is expired.

    Thanks,
    waiting for replay
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total views
1,540
On SlideShare
0
From Embeds
0
Number of Embeds
347
Actions
Shares
0
Downloads
0
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide

In-app purchases for BlackBerry 10

  1. 1. Selling digital BlackBerry 10 goodsGetting rich with sleeping
  2. 2. What’s the goal?+ + =
  3. 3. Time is Money!Time is money. Most business people know that for a fact, but still have ahard time getting out of bed in the morning. That why the “Time is Money”alarm clock was developed: to make staying in bed a less attractive option.You get five free snooze minutes every day. Not enough for your snooze?No problem, but it is going to cost you. Because time is money.
  4. 4. Time is Money!
  5. 5. Setting up the payment serviceImport the Payment Service classesAdd the following to your .pro fileLIBS += -lbbplatform
  6. 6. Setting up the payment service (II)You can now use the Payment Service classes!But what to do with these?#include <bb/platform/PaymentManager>#include <bb/platform/PaymentConnectionMode>#include <bb/platform/PaymentReply>#include <bb/platform/PurchaseReply>#include <bb/platform/CancelSubscriptionReply>#include <bb/platform/DigitalGoodReply>#include <bb/platform/ExistingPurchasesReply>#include <bb/platform/PriceReply>#include <bb/platform/SubscriptionStatusReply>#include <bb/platform/SubscriptionTermsReply>#include <bb/platform/PurchaseReceipt>#include <bb/platform/DigitalGoodState>
  7. 7. Connecting with the Payment ServiceWhat if I don’t?You may lose some money and sponsor BlackBerry.Static method, so affects entire appYou may want to do this in main.cppBefore you create PaymentManagers!(Although undefined behaviour is pretty cool.)PaymentManager::setConnectionMode(PaymentConnectionMode::Test);
  8. 8. And we’re just getting started!PaymentManager* m_paymentManager = new PaymentManager(this);
  9. 9. Some UI stuffSet the window group ID of the PaymentManagerNow it can show dialog boxes!const QString windowGroupId =    bb::cascades::Application::instance()->mainWindow()->groupId();m_paymentManager->setWindowGroupId(windowGroupId);
  10. 10. Some UI stuff (II)Dialog box shows banner with the application name and icon (production)m_paymentManager->setApplicationName("The Awesome Store");m_paymentManager->setApplicationIconUrl(QUrl("http:///mycompany.com"));If not provided the values from BlackBerry World are used
  11. 11. Time to buy some stuffrequestPurchase(id, sku)PurchaseReply::finishedSIGNALreply->isFinished()reply->isError()-reply->purchaseMetaData()-reply->receipt()
  12. 12. Time to buy some stuffrequestPurchase(id, sku)PurchaseReply::finishedSIGNALreply->isFinished()reply->isError()-reply->purchaseMetaData()-reply->receipt()
  13. 13. Momentics time!<INSERT CODE HERE>
  14. 14. Great, but how do you test?Two options:Test connectionBlackBerry World sandboxPaymentManager::setConnectionMode(PaymentConnectionMode::Test);
  15. 15. Test connection<INSERT DEMO HERE>
  16. 16. BlackBerry World sandboxAdd the user in the sandboxCreate an app draft (yes, you have to create an app icon)Add the goodsAdd a release build (draft is okay)
  17. 17. BlackBerry World sandbox (II)
  18. 18. Types of in-app goods’ licensesNon-consumableConsumable7-day subscriptiontrial option available30-day subscription
  19. 19. BlackBerry World sandbox (III)<INSERT DEMO HERE>29898887
  20. 20. What else is out there?Methods to check for previous purchasesvoid MyPaymentApp::getExistingPurchases(bool refresh){    //Request the existing purchases from the Payment Servicesserver.    const ExistingPurchasesReply *reply = paymentManager->        requestExistingPurchases(refresh);     // Connect the finished() signal to a slot to handle theexisting purchases.    connect(reply,            SIGNAL(finished()),            SLOT(handleExistingPurchases()));}
  21. 21. What else is out there? (II)Manage subscriptions...void MyPaymentApp::checkSubscriptionStatus(const QString &id,                                           const QString &sku){    if (id.isEmpty())        return;     const SubscriptionStatusReply *reply =        m_paymentManager->requestSubscriptionStatus(id, sku);     connect(reply,            SIGNAL(finished()),            SLOT(subscriptionStatusResponse()));}
  22. 22. Questions?

×