WebWorks API payment issue; persistence/identification of the purchase.

I have a question for anyone who is familiar with the payment API WebWorks.

In an application, I did pretty well, I intend to have a content purchasable electrode.

I put everything in place so that if make you a purchase, a value of localStorage is created. The function to launch the content purchased checks if the value of localStorage exists, and if it isn't the user is directed to the premium 'content' section. If it helps, here's the code:

  function getPremium() {
    try{
      blackberry.payment.purchase({
      "digitalGoodID":"myGoodID",
      "digitalGoodSKU":"myGoodSKU",
      "digitalGoodName":"Digital Good",
      "metaData":"metadata",
      "purchaseAppName":"App Name",
      "purchaseAppIcon":null},
      success,failure);
   }catch (e){
     alert ("Error" + e);
   }
 }

 function success(purchase) {
   localStorage.setItem('premiumpurchased','yes');
 }

 function failure(errorText, errorId) {
   alert("Error occured: " + errorText + ", " + errorId);
 }

//Function called to check if premium content was purchased
 function checkPremium() {
if (localStorage.getItem('premiumpurchased') == 'yes') {
bb.pushScreen('premium/index.html','premium');}
else {getPremium();}
}

Now, if the user of the application content purchases and then deletes the app, the localStorage is removed.

If they attempt to make a purchase once again, I think I know that they will have (because it is the electrode), which is what I want to do (in other words, I don't want people to be charged twice).

But in this case, how the app would re-create the localStorage value so that premium content are accessible? Or y at - it one another, better way other than creating a value of localStorage for this?

I read http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Sample-App-BlackBerry-WebWorks-P... and https://developer.blackberry.com/html5/apis/blackberry.payment.html and couldn't find an answer on the part of the people.

Thanks in advance to anyone who can help you.

Little late, but I can confirm that the above code works.

Tags: BlackBerry Developers

Similar Questions

  • HP officejet pro 8600: issue of identification of the appellant

    Caller ID display quit working after I have play with the printer trying to clean the heads.  What can I do to retrieve the caller ID?

    The cleaning of the print head should not have caused your display problem, but there are a few things that can be tried.

    First of all, make sure that the printer is plugged directly into a wall outlet, not a surge protector. Once, while the printer is on, remove the power cord at the back of the printer for one minute. There is still nothing on the display of the printer to be replaced. You can contact the HP Support by clicking on this link and fill out the form below to discuss the options based on your warranty.

    Please let me know the results after following the above. If you are able to solve your problem or reach some resolution, click on accept solution. If you appreciate my help, please click on the thumbs up icon. The two icons are below this post.

  • Personal and the issue of api payment methods Org

    Hi, we are setting up Payroll Canada and moving out of ADP. We have created a number of new payment methods Org and will have to pass the personal means of payment of all Canadian employees to new methods of payment org. It looks not to I can just update the existing personal payment with a new org_payment_method_id methods. The api, hr_personal_pay_method_api.update_personal_pay_method, doesn't have a parameter for org_payment_method_id. I don't see where I could go to an end date to existing staff pay method from effective_end_date is an out parameter. Is the expected solution to remove the existing payment method and create a new one with the new method of payment org id?

    Thank you

    Ellen

    Hi Ellen, I can understand why you want to be able to do this in the way you describe, but at the same time I think that I understand why you can't actually. Given that the mode of payment org pretty well tells the system account to pay, it would be quite important do not alter who 'accidentally '. You need deadline personal remuneration methods 'old' first (via hr_personal_pay_method_api.delete_personal_pay_method), but later, it should be a relatively simple matter to recreate each set of account details against the new org payment method. Just if you make postings as you proceed make sure, treat you the end-dating back to the old and creating the new as a unique validation unit - and if one of these calls API fails for an assignment, then roll it all back for this assignment. This is especially true if you have all the assignments with payment methods 'split '.

    It would also end date the former use of payment method org on each of the affected payroll, warns one accidental use later. If I remember correctly, the system won't let you do that, unless there is no method of active personal 'old' pay beyond the date of the purpose necessary.

    Hope this helps,

    Clive

  • Record 2 channels audio WebWorks API?

    Reference on the WebWorks API indicates that the recording from microphones is possible on a single channel. However, the application of voice Notes record clearly on two channels, as can be easily shown by moving the Playbook from left to right while he was recording his own voice. Where can I find the API WebWorks for 2-channel audio, record from the MICS Playbook? Thank you.

    It is currently not possible.  I have added your request to github issues as an improvement to the feature list:

    https://github.com/BlackBerry/WebWorks-TabletOS/issues/54

  • 3D studio Max 2010, cannot start. Identification of the error of debugging/possible?

    Used 3D Studio max 2010 (perpetual teaching license) for well over a year. The program does not start for some reason any in the last two weeks. Vista32 bit version home said that the program has stopped working (before you get to the boot screen) with no identification on the error. If 3D Studio Max ran that there is software identification own error built in but as is happening this crash of the program until the program starts there is no way to know what is the cause. The question here is, is there a program hidden in Vista or downloaded from somewhere like Cnet I can run everything trying to start 3D Studio Max, about what is at the origin of the program that worked very well die suddenly?

    I tried uninstalling/reinstalling as well as the repair feature in the control panel > programs & features, but nothing works to alleviate this problem. Help & thanks for any information on that.

    Thanks again for your help because I don't know exactly what's wrong, but it's fixed now. Here are the steps I used just in case someone else has the problem & solutions.

    Restoring the system was such that it was more than 30 days, when it all started so I went with suggestion of Marilyn to the subject to start with a clean boot of Vista. I don't know if it was going to arrest her or not, but as it has system attendant, I wanted to ensure that he would not scramble things upwards trying to find out what the problematic program could be first turned off Avast antivirus (free).

    Since the boot, I started by turning on just autodesk licensing service, and then the apple programs, nvidia & adobe I was sure that those who will not be a problem because they have been on this plu pc of 3DStudio Max with little problem. Finally, I went through the list of services, turn on & restart and be able to open 3DStudio Max. When he finally got the end of the list, the only thing left to start near the top of the boot was avast antivirus (in the services menu, it's on, but in the menu it has been disabled until I turned it avast turn it back on.) Once I turned avast activated, I turned on the services menu then to start during the last entry on the list. From there, I got an error message when you try to start vista had some issues that needed to be repaired. After telling the repair through the machine got fined office since just before done restore point cleaning starting the process.

    As I imagine that Avast could still be a problem, I did a complete uninstall of it & all Avast/Awil (a software developer) files from the computer. Then as an experiment, I installed the latest version of the program to test & see if 3DStudio Max will still crashing like all services had been turned on & this program could open. After Avast was completely installed I went open 3DStudio Max & it works fine now so I guess it was something fixed during the repair and/or process the older build of Avast antivirus (which was the only program not turned on the list of services in this process of cold start).

  • BlackBerry WebWorks PIM Contact Plugin customization for retriving the list of all the Contacts in the phonebook

    Hi all

    I use the plugin contact Blackberry 10 webwroks sdk 1.0.0.Howvere pim, it gives me almost all pim access contact api.

    However, I would like to add a few additional options of pim api. Exactly, I want to customize seen pim plugin contact. And to expose methods added to the WebWorks project.

    Now, will I have to make the plugin necessary to start contact (by writing native code, and then wrap the same in construction of extension).

    Or is he in any case, I can get the code for the pim.contact plugin that came with blackberry SDK and can make the necessary changes in the native code and buiding new folder so and, following the steps for the construction of the extension.

    Here is the reason why I am demanding to make it personalized:

    I can't find any method that can retrieve list of the basicarry contact a table containing data for all contacts. The only thing I am able to do using the method find explicitly by setting the limit.

    Please suggest something and also correct me if I am wrong somewhere.

    It may be easier to start with your own custom extensions, but if you want to take a look at the SDK WebWorks and included extensions, that would be the best starting point.

    https://github.com/BlackBerry/BB10-WebWorks-framework/tree/master/ext/PIM.contacts

  • Problems when creating extension using pim contact webworks API

    Hello

    I need to create an extension that use webworks APIs to get all contact data as well as launch the contact selector and must obtain the name of the contact, numbers and Base 64 of contact image chain.

    Now, I have a few quesries below:

    1. I tried to reach my api requirement with webworks. For this, I did changes in the config.xml file.



    <>ermissions >
    <>Ermit > access_pimdomain_contactsermit >
    ermissions >

    and able to access the API of pim.contact placed here: C:\Program Research In Motion\BlackBerry 10 WebWorks SDK 1.0.4.11\Framework\ext\pim.contacts

    But when I tried to get all contacts by using the getContactAccounts() method, it gives me two accounts simcontacts and LocalContacts and their identity papers are respectively 2 and 19.

    I found that I can get the list of contacts using the example of the contacts. but this is to limit the length to 20.

    http://supportforums.BlackBerry.com/T5/Web-and-WebWorks-development/need-help-with-BB10-WebWorks-con...

    2.i have not found any documentaion appropriate for the fields of my contact: name, numbers and Base 64 of contact image chain like the way they gave in the native SDK documentation.

    Please share any code example that is in all fields of contact data of Singla retrieving.

    3. I need to share my contact plugin and need to expose certain methods of my plugin webworks.

    How can I reach it?

    Is it possible to get the code side native for pim.contact plugin, so that I can add methods more in it and can expose these methods more Web app works by making the required in index.js and client.js chnages.

    Help, please.

    I checked and there seems to be a problem with the API that has been fixed for version Gold SDK. Here you can find a similar position:
    http://supportforums.BlackBerry.com/T5/Web-and-WebWorks-development/need-help-with-BB10-WebWorks-con...

    And more information on the real fix here:
    https://github.com/BlackBerry/Cordova-BlackBerry-plugins/pull/80

    It seems that it was default 0, which gave 20 results, as opposed to-1, the expected default value.

    For now, if you simply pass a high value for limit, which should get the contacts (i.e. 1000). I know that's not ideal, but a workaround for now.

    For plugins, the best starting point would be the following.

    WebWorks SDK 1.0:
    https://github.com/BlackBerry/WebWorks-community-APIs/tree/master/BB10/template

    WebWorks SDK 2.0:
    https://github.com/BlackBerry/WebWorks-community-APIs/tree/master/BB10-Cordova/template

  • Magnetometer WebWorks API?

    Where can I find the magnetometer Playbook WebWorks API? Thank you.

    Unfortunately, there is not yet.

  • I have my payment plan current iCloud from the web, but when I install programs on my Mac, I suggest that the version has expired. How can I fix it?

    I have my payment plan current iCloud from the web, but when I install programs on my Mac, I suggest that the version has expired. How can I fix it?

    iCloud is an Apple product... you hear Adobe Creative Cloud?

    Your subscription to cloud shows correctly on your account page?

    https://www.adobe.com/account.html for subscriptions on your page from Adobe

    If you have more than one email, you will be sure that you use the right Adobe ID?

    .

    If Yes

    Sign out of your account of cloud... Restart your computer... Connect to your paid account of cloud

    -Connect using http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html

    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html

    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html

    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html

    -ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp

    -http://helpx.adobe.com/creative-cloud/kb/license-this-software.html

    .

    If no

    This is an open forum, Adobe support... you need Adobe personnel to help

    Adobe contact information - http://helpx.adobe.com/contact.html

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    -Select your product and what you need help with

    -Click on the blue box "still need help? Contact us. "

  • When cancelled payments should be reconciled in the cash management

    Hello

    I have a problem to reconcile payments invalidated in cash management. Invalid target payments are payments issued or negotiable subsequently cancelled due to incorrect recording or check was stale.

    These records appear in the Transactions available to the void that needs to be reconciled payments reconciliation report.

    After the reconciliation, cancelled payments no longer can be found in the Transactions available for Reconciliatio report. However, when I generate general accounting reconciliation in cash management, reconcile them payments invalidated are listed under payments no closer. Which causes the difference in cash GL balance of the account with the adjusted bank statement balance.

    How can I remove this payments in the State of general accounting reconciliation? Or are these payments (cancelled) must be reconciled?

    Thank you.

    Hi Mae

    What kind of lines, you get in your bank statement for payment Sub?

    1. no line - payment is invalidated in oracle no activity in the Bank. Uncheck show payment Sub

    2. two one line for the original and the other for refund - uncheck the box show payment Sub - balance statement of Bank with the other line

    3 stop line in option two bank statement

    a. payment by check see the Sub - reconcile stopped line with cancelled payment

    b. uncheck display payment Sub - stopped line as external change.

    Check this note for the General reconciliation report:

    Reconciled, voided, old reconciled payments showing the reconciliation of General Ledger report (Doc ID 1213033.1)

    Samir

  • I can't reach some websites with any browser. I get the message ERR_CONNECTION_REFUSED. If I boot in safe mode I don't have the issue. I tried the reset and repair of everything. Help, please

    I can't reach some websites with any browser. I get the message ERR_CONNECTION_REFUSED. If I boot in safe mode I don't have the issue. I tried the reset and repair of everything. Help, please

    Try to run this program in your usual account, then copy and paste the result in a response. The program was created by Etresoft, a regular contributor.  Use please copy and paste the screenshots can be difficult to read. On the screen with the Options, please open Options and tick the boxes in the bottom 2 before the race. Click on the button "Report share" in the toolbar, select "Copy to Clipboard" and then paste into a response. This will show what is running on your computer. No personal information is shown.

    Etrecheck - Information System

  • Whenever someone calls, I'm not able to take the call and cannot see the identification of the appellant as well. However, he gets noticed in the missed calls.

    I have an iphone 6. Whenever someone calls, I'm not able to take the call and cannot see the identification of the appellant as well. However, he gets noticed in the missed calls. Help, please.

    It is a problem of carrier - I would like to talk with my carrier

    Your signal may be weak or you can be in a dead zone - or there may be interference - those that can cause the call to go directly to voicemail

  • "The program issued a command but the command length is incorrect" unable to open a session in windows xp any mode (safe mode, last known

    I am not able to connect to the windows xp system after Windows update. the following error message come on the logon screen after entering the user name and password.

    "The program issued a command but the command length is incorrect.

    I'm now trying the solution.

    try to run in the final... known good configuration does not

    trying to boot into safe mode... does not...

    does not work any other way...

    ... recovery console not able to connect

    repair system does not...

    ..

    only the format option left on my side...

    someone help me...

    Hi HarishLodhi,

    1. what happens when you try to connect to the Recovery Console?

    2 of repair of system are. which option you referring?

    You can try to connect to the Recovery Console by following this link. Subsequently, follow the steps in the link & check if the problem persists:

    Important:  This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, check the number of the following article: 322756 (http://support.microsoft.com/kb/322756/) how to back up and restore the registry in Windows.

    How to recover from a corrupted registry that prevents Windows XP startup?

    Hope the helps of information.

  • Why G33/G31, which is a graphic chipset is detected by the utility for the identification of the chips?

    Why G33/G31, which is a graphic chipset is detected by the utility for the identification of the chips and not the main chipset?

    Thank in advance for any info that you can provide me with

    Concerning

    Macias
    -Please do not use TinyURL my firewall blocks them.
    Click on the star of CONGRATULATIONS on the left, if I helped you. Please mark as RESOLVED, if your question has been answered.

    Hi, Macias:

    The G31 and G33 chipsets chipsets are not only graphic.

    http://Ark.Intel.com/products/chipsets/29000

    http://Ark.Intel.com/products/chipsets/30686

    Kind regards

    Paul

  • Issues are transferred to the forum (opening) original to a more appropriate forum? I thought I read that while I asked my first question?

    I ask because I open/asked my first question "Desktop and personalization", for lack of a better forum. "Troubleshooting the system" or "System inquiry" would better describe the nature of my question, but none exist.

    I received no answer, can you suggest a better forum of the 14 listed? And if yes how can I move it to another forum?

    Here is a list of the 14 WinXp forums.

    Windows XP Forums (14)

    Desktop and personalization
    Hardware and drivers
    Performance and maintenance
    Install, upgrade, and activate
    Programs
    Music and sound
    Security, privacy, and user accounts
    Networking, e-mail, and getting online
    Files, records & research
    System repair and recovery
    Internet Explorer
    Windows Update
    Game

    I opened another in the right Forum, answers to Microsoft Site Feedback.

    title "issues are transferred to the forum (opening) original to a more appropriate forum?" I thought I read that while I asked my first question? REPEAT - in some sort the first attempt ended up 'Desktop and personalization' ',

    who has responded.

Maybe you are looking for

  • Of memory can what type of bars I use in Satellite Pro A210-1AZ

    I just bought the satellite pro a210-1az which has 1 GB ram samsung.I'm tempted to increase the amount of ram and I think theres 1 free slot, my best plan would be to exactly match the installed module. My problem is the determination this exactly.I

  • Disappeared from the sidebar of the Finder. Where at - it go?

    On my MacBook, I'll see something like this in the sidebar of Finder - a new feature in El Capitan. Three options will usually appear in the sidebar of the Finder, and they look like this: However, on my iMac, the Finder sidebar has disappeared for s

  • Photos of navigation, can't see the last import

    I'm trying to create maps of Christmas, posters, etc. of Shutterfly and other Web sites. When I Browse Photos upload photos, I do not see my last import. I can see from the pictures, but not when I am browsing from another Web site. Thanks in advance

  • cDAQ-9184 AI DO

    Community of hell, I'm working on a chassis OR cDAQ-9184-one module (NI 9474) and two modules of it HAVE (NI 9215). The task is to acquire analog measurement and generate a pulse train to trigger a Laser sensor. Please find attached my simple diagram

  • Laptop refuses to sleep

    When I click on sleep, the montor goes off and it connects me on, but actually sleep like before. Any ideas on what is happening here? Thank you. (Y530)