Restore consumable purchases using MKStoreKit - objective-c

I'm using MKStoreKit, and it features a rather useful method to restore purchases, as explained here
However, I use consumable currency to unlock objects. Each object that is unlocked by spending currency is only unlocked locally, so if the user spends 1 currency to unlock 1 object, then deletes and reinstalls the app, that 1 object won't be remembered as being unlocked.
One way around this that doesn't involve storing user details on my own server, would be to create non-consumable in-app purchases for each object, and unlock them when the user spends the currency. Thus the non-consumable is invisible to the user. I haven't tried this and it's not ideal, since there's more overhead in adding purchases, but I can't see why it wouldn't work?
Which leaves the currency. Can I restore the currency using MKStoreKit without having to log it on my own server or taking user details via GameKit etc? Many thanks!

About your first question, the only real difference in the user experience if you did it with separate non-consumables would be that they would be asked to complete the transaction when you ask store kit to buy the non-consumable rather than when they buy your currency. This makes the concept of currency somewhat irrelevant, since in the model you describe, they are charged only when they spend, and it's proportional to how much they spend.
If you already have a released app, with real people who have paid for this currency, you're going to have to support a transition period where those who have tokens left can spend them and avoid calling store kit in those cases since it was already called to get the tokens. Also make sure you stop selling new ones.
If it's a new app, just ditch the idea of currency entirely and support buying things with real money. That's what it looks like to the user and that's what it really is, now.

Related

YouTube API Services Compliance Review

I have a project where I need to have the API quota increased significantly from the 10,000 daily hits, and I think this is being processed by Google as part of a YouTube API Services Compliance Review.
However, I have not had any response in over a week and the delay is putting the project at risk of a delayed launch and additional costs.
Does anyone know if this is normal and if there is a way to expedite the review, or speak to someone? Even pay for a higher tier of support?
Thanks in advance.
If you’ve filled the audit form https://support.google.com/youtube/contact/yt_api_form?hl=en properly, you should get a response within two weeks (Google reviews thousands of these, among other things to prevent abuse this is one of the processes that isn’t fully automated).
I recommend if your in a rush since your paying for credits you might as well open a second account and load balance between two or even three accounts; in your code you can create counters and swap before capping out the 24 hour term; not sure what data you’re looking to extract but depends on what data you may be able to even use other services to supplement.
They will get back to you about your application; just requires massive patience.

Good Practices for Auction E-Commerce - Should I store Credit Cards Details?

I am sorry if this wasn't a good place to ask a question like this, but since I always got help from Stackoverflow I though I could get some answer to my problem.
So here is the thing, I am building a e-commerce website like many famous websites over there, where you can make bid offers for items on the market.
The thing I want to be sure is that when someone place a bid for some item, they can not turn back on their word, because if they get accepted the money should be withdrawn from their bank accounts, do you get what I mean?
Because I want the merchant to be safe if they accept a offer they want the money, and they don't want to look for another legit offer.
So how can I accomplish this?
Should I ask the credit card details when they make the bid offer and only make the withdraw operation from their accounts if the their offer was accepted by the merchant? [using some automated trigger on my database of course]
If this is not the best practice to accomplish this, which is the one??
I am really new into payment methods and I just started doing my search for Payment Gateways (maybe they offer me this functionality... I don't know?!)
You should never store credit card details, and have the details is not really any guarantee of getting paid since the card could just be canceled.
What you are probably looking for is for Authorization and delayed capture (depending on the timeline you are looking at). Different payment processors have different time requirements around how long you can hold an authorization. In general you would make a request with the API to Authorize the charges (kind of like a 'hold' on your credit card) and then later you would either cancel or Capture, where the funds would be transferred. See more info about the process and Square's API here: https://docs.connect.squareup.com/articles/delayed-capture-transactions/

iTunes App from Paid to Free - Existing User Dilemma

I have an app in the iTunes Store and sales have slowed so want to convert it to a free app from a paid app. The new app will contain an option to buy, using In App Purchase. I was considering using a flag / pre processor macro to then allow full features for those that buy using the IAP, and limit features for those who have not.
The problem will be if I add this new pre processor macro to the new update, those who have previously paid for the app will not be able to use full features, as they would not have used the IAP to "unlock" the full app.
Does anyone have any suggestions to overcome this problem.
I have a few ideas, but in my mind they are not fool proof.
Thanks for assistance.
Pondering exactly the same issue here. The only thing i found workable (under most use cases) is to look-up gamestate information at when the new_free_iAP version starts.
If there is no iAP state, AND if games exist, AND the playtime counter > 0, i will make the assumption that the user bought this and will preseed his/her iAP configuration information to indicate that this was iPurchased. The only users left out would be buyers who NEVER started the app.
Not fool proof, but better than none. Ugly state to manage, nasty testing for this. And of course, this is a variable geometry solution : if I did not have reliable persisted state in the current version, i would not know where to start.

Recurring billing with Rails - what are my options?

Before jumping in I'd like to know what all of my options are, and, if possible their pros and cons.
The two I know of are using ActiveMerchant, or the paypal_recurring gem, but will they satisfy these requirements?
Ability to accommodate monthly and annual billing
Ability to suspend, cancel accounts etc
Deal with out-of-date card details or failed payments
The to-do list for the paypal_recurring gem includes 'adding support for IPN' - how will not having this impact functionality?
I know there is the railskit SaaS but I'd rather code something myself as the railskit is still on 3.2.1.
I know there are services like cheddergedder/chargify etc, but do they tie you in? Are they US only? Are they worth considering - or are they usually just aimed at non-developers?
Thanks in advance.
I just finished going through this, so I'll try to shed some light on your options. I ended up using Paypal Express Checkout for all recurring purchases through Paypal. We had a custom-rolled recurring billing setup that charges a customer's credit card monthly through Authnet, but had to switch because we needed an international solution, and Paypal was one of the only ones that supported the currencies we needed, and wasn't entirely a nightmare to code.
You can use ActiveMerchant for recurring billing with this plugin, though keep in mind that it is not officially a part of ActiveMerchant, and therefore is subject to break if ActiveMerchant changes how it handles certain things. Because of that, I ended up using the paypal-recurring to handle communication through Paypal, and then rolled my own IPN parser, with help from Railscasts. Another link that helped me a lot was this, though all the :txn_type values ended up being different.
With regards to that last link, here are the 4 :txn_types that I specifically watch out for:
express_checkout - first postback.
recurring_payment_profile_created - sent on first postback when the user first subscribes.
recurring_payment_profile_cancel - sent if user cancels subscription from Paypal's site.
recurring_payment - Money has been transferred to your account. This is what I wait for before I renew their subscription on a monthly. This post also comes with payment_status, which needs to be completed.
The other stuff you mentioned, like handling failed payments and out-of-date cards, is handled through your Paypal account.
Just a word of warning - the only reason I ended up using Paypal is because it is universally recognized and trusted, and it accepted international currencies. There is an enormous amount of documentation on their site, and most of it is redundant, confusing, and entirely too long. My recommendation is to make sure you really want/need to deal with recurring payments, as they are difficult to implement correctly and can be more trouble than they're worth.
I'm currently looking at Ryan Bates example of Stripe. They are a California based company that uses/offers the features you have listed.
www.stripe.com
They only charge when you receive money. I think that they are 3% plus $0.30 per successful transaction. Much better than some other companies that have a monthly minimum. Right now you have to have a bank in the USA to use their services as a merchant. However, anyone can use your site with out of the country credit cards.
The SaaS Kit is now tested with Rails 3.2.2. :) It doesn't support IPN yet, but it's on to the todo list. With all the info here in one spot, I suppose I have no excuse not to get it done. :)

Personal Money Movement API

I'm trying to create a simple personal project: I want to give myself bounties for completing tasks that often fester on my todo list. If I complete a task, for example, $5 should automatically move out of my savings account into a discretionary spending debit card.
Are there any APIs or banks that have those APIs that could let me do that? All of the paypal APIs seem to charge a fee, which would be kind of silly if the money is simply moving between accounts. Any suggestions?
Most banks/organisations will charge I suspect as a vast amount of money made by these organisations is from transfer charges. I cannot think of free api that would let you do it.
However you could consider using another commercial organisation, say like Amazon, and perhaps use it's APIs to supply purchase with gift cards automatically? I'm not saying Amazon is free, I'm just using it as an example.
It's not quite what you want but may be acceptable.
it may not be pretty, but you can use curl to do transactions over https, provided your online bank uses standard html forms in some way, but it typicaly takes 3 processes
1. Login to get a token (user name and password will be required)
2. Use token to get a cookie (in some cases 1 and 2 are reversed)
3. use curl to post the form data for your transaction
There are some good pointers on using curl in similar ways here:
http://curl.haxx.se/docs/httpscripting.html