Forum General YahooGames.dialog missing apiToken

Any issues or discussions relating to Flash development are welcome here.

YahooGames.dialog missing apiToken

Postby mike.sheridan » May 10th, 2015, 8:06 am

Hi all! I am pulling my hair out on this issue when using Yahoo Payments.. I am invoking the YahooGames.dialog('buy') dialog - with all of the required arguments

Code: Select all
YahooGames.dialog('buy', {
            apiToken: API_TOKEN,
            name: item.name,
            description: item.description,
            icon: item.icon,
            currency: item.currency,
            amount: item.amount,
            transactionid: item.transactionid

        }, function (data) {
            if ( !data.error )
            {
                var transactionID = (data.transactionId !== undefined ? data.transactionId : data.transactionid);
                alert('transactionID: ' + transactionID);
               //call flash
            }
            else
            {
               //call flash

            }
        });


The problem is I get an error in the dialog that tries to open: "Invalid Argument(s)" On of the given arguments had an invalid or missing value

missing apiToken This dialog can only be show with a valid apiToken. The api token looks to be correct.. am I passing it wrong? do I add to somewhere else? The documentation does not mention this and I've tried just about everything.

Can anyone shed any light on this?
mike.sheridan
 
Posts: 3
Joined: April 20th, 2015, 3:43 am

Re: YahooGames.dialog missing apiToken

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

There's no apiToken in the documentation for the payment dialog:

https://gamesnet.yahoo.net/documentatio ... nts/dialog

Why are you trying to pass in the apiToken? That can't possibly work, and it's not meant to be used in any of the Canvas services? Just remove that line, and you should be good, given that you are on a page where you have initialized YahooGame.js:

https://gamesnet.yahoo.net/documentation/yahoo/canvas
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: YahooGames.dialog missing apiToken

Postby mike.sheridan » May 10th, 2015, 10:46 pm

Thanks, Yah it ended up being in my YahooGamesSetup call, I wasn't passing the user token rather I was sending the apiToken which it did not like :)
mike.sheridan
 
Posts: 3
Joined: April 20th, 2015, 3:43 am


Return to General