Forum PayVault iOS 7 Receipt Validation

Discussion and help relating to the PlayerIO payment solution, PayVault.

iOS 7 Receipt Validation

Postby Guillaume » April 22nd, 2015, 4:38 pm

Hello,

I'm using Unibill plugin and iOS 7 (minimum) for IAP Purchases in my game.
I'm getting the Base64 Receipt string, but i'm unable to validate it, Payvault does not return a success code when i try to validate it.

Must i do something specific, or is Payvault actually unable to validate iOS 6 > Transact Receipt format ?

Thanks in advance YGN team !

Cordially,
Guillaume
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: iOS 7 Receipt Validation

Postby Guillaume » April 23rd, 2015, 2:15 pm

Still unable to validate in Sandbox mode.

I updated iTunes connect identifiers for my coins to something like com.mycompany.mygame.coins12 . They are visible in the InApp menu, but they are in "Ready to submit" mode. Can this affect the result, even if we are testing in Sandbox mode ?

I'm in C#, sending receipt with something like this:

Code: Select all

                Dictionary<string, string> info = new Dictionary<string, string>(1);

                info.Add("transactionReceipt", currentReceipt.signature);

client.PayVault.UseBuyInfo("ios", info, delegate(Dictionary<string, string> result)
                {
                    if (result.ContainsKey("success"))
                    {
                        if (result["success"] == "true")
                        {
                            XDebug.Log("Receipt successfully sent !");
                            RequestProcessing = false;
                            YGNBiller.GetCallbackById(currentReceipt.productId);
                            unvalidatedReceipt.Remove(currentReceipt);
                            Save();
                        }
                        else
                        {
                            XDebug.Log("YGN responded with an error to the Receipt...");
                            RequestProcessing = false;
                        }
                    }
                    else
                    {
                        XDebug.Log("YGN responded with an error to the Receipt...");
                        RequestProcessing = false;
                    }
                },
                delegate(PlayerIOError error)
                {
                    XDebug.Log("YGN responded with an error to the Receipt...");
                    RequestProcessing = false;
                });


And the receipt look like something like this:

EDIT: REMOVED ! (But Base64 receipt string !)

Is there something wrong ?
It may not be a problem for standard consommable product, but as this verification is tied for Coins in Payvault, users will not be able to buy any currencies in the game.

Any help please ?
Thanks !
Last edited by Guillaume on May 6th, 2015, 12:17 pm, edited 1 time in total.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: iOS 7 Receipt Validation

Postby Guillaume » April 28th, 2015, 4:05 pm

YGN Team ? :(
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: iOS 7 Receipt Validation

Postby Guillaume » May 5th, 2015, 10:34 am

Bump !

Please, some help ?
I'm unable to get receipt validation working, even in iOS 8.3, in Sandbox mode AND in Beta mode.

I don't know if it's because i done something wrong or if YGN current implementation only support iOS 6.0 validation format only.

I'm seriously planning to switch all my backend, because at the moment, i'm unable to buy ANY currency in my game on iOS. And the deadline is very near.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: iOS 7 Receipt Validation

Postby Guillaume » May 6th, 2015, 1:11 pm

What is the format attented by UseBuyInfo ?

I tested my receipt with Sandbox environnement with a HTTP GET/POST tool, and i succeed.
The Body content of the request was something in this format:

Code: Select all
{ "receipt-data" : "MIITyQYJKoZIhvcNAQcCoIITuj...Y=" }


And i received Apple Success return code, and all the required info.

So why do i keep to fail at validating with iOS with YGN ?
Again at the moment, i'm unable to get any coins because of the validation bug...
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: iOS 7 Receipt Validation

Postby Henrik » May 10th, 2015, 7:50 pm

We'll look into it and figure out what's changed.
Henrik
.IO
 
Posts: 1822
Joined: January 4th, 2010, 1:53 pm

Re: iOS 7 Receipt Validation

Postby Guillaume » May 10th, 2015, 8:38 pm

Thanks for the support Henrik !
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: iOS 7 Receipt Validation

Postby Guillaume » May 16th, 2015, 11:19 pm

Hello Henrik,

Any news about it ?
Our game is going in BETA the 1st July, and we are expecting to stop the developments for our V1, the 22 June.

Do you have any ETA about the correction ?

Thanks in advance.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: iOS 7 Receipt Validation

Postby Guillaume » May 19th, 2015, 1:34 pm

BUMP !

Any news /ETA about it, Henrik ?

Thanks in advance !

Cordially,
Guillaume
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: iOS 7 Receipt Validation

Postby Guillaume » May 24th, 2015, 12:48 am

BUMP ! Seriously...I posted my initial question the 22 April...

I appreciate your work, but things are going to be critical here if there is no updates.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: iOS 7 Receipt Validation

Postby Guillaume » May 27th, 2015, 9:20 am

BUMP !

Really, i don't like to up a post or to post multiple response.
But we have less than 1 month on our game for being able to have iOS receipt validation working...

Sorry to bother you Henrik, but we need your help on this.
Also wishing everything is alright on your side.

Sincerly,
Guillaume
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: iOS 7 Receipt Validation

Postby Henrik » May 28th, 2015, 10:37 pm

We released a fix about two weeks ago which contains updated iOS IAP receipt parsing that should be able to handle their newer style receipts.
Henrik
.IO
 
Posts: 1822
Joined: January 4th, 2010, 1:53 pm

Re: iOS 7 Receipt Validation

Postby Guillaume » May 29th, 2015, 3:06 pm

Thanks for the info Henrik !

I'm still unable to validate my receipts, i will do some test.
Can you give me an extended example of the receipt data format in code, expected by Payvault ?

The current example in the "hidden" documentation don't tell anything about it.

Thanks !
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: iOS 7 Receipt Validation

Postby Guillaume » June 2nd, 2015, 11:12 am

Finally made it with a sample project i have created !

For incoming readers, now that Henrik/YGN corrected the iOS receipt validation, the requested format is very simple, it's only the Base64 signature, no need for JSON parsing or else.

Here a little example:

Code: Select all

                string computedReceipt = "MIITyQYJKoZIhvcNAQcCoIITujCCE7YCAQExC....(something)...........VF2oMM54M2DaqKurSoSPiHrdZTHX83C3ijkbqY=";

               Dictionary<string, string> info = new Dictionary<string, string>(1);

                info.Add("transactionReceipt", computedReceipt);

                client.PayVault.UseBuyInfo("ios", info, delegate(Dictionary<string, string> result)
                {
                    if (result.ContainsKey("success"))
                    {
                        if (result["success"] == "true")
                        {
                            Console.WriteLine("Receipt successfully sent !");
                        }
                        else
                        {
                            Console.WriteLine("YGN responded with an error to the Receipt...");
                        }
                    }
                    else
                    {
                        Console.WriteLine("YGN responded with an error to the Receipt...");
                    }
                },
                delegate(PlayerIOError error)
                {
                    Console.WriteLine("YGN responded with an error to the Receipt...");
                });
                });


Thanks for all ! Very great !
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France


Return to PayVault



cron