Forum PayVault Error with GetBuyCoinsInfo and UltimatePay

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

Error with GetBuyCoinsInfo and UltimatePay

Postby sebas77 » August 16th, 2013, 11:42 am

Hi,

I use the function GetBuyCoinsInfo as instructed, with ultimatepay provider.
We've already registered at ultimatepay.
We filled all the exchange rates and coins costs.

when I use

PlayerIOUtility.Instance.client.PayVault.GetBuyCoinsInfo(
"ultimatepay", new System.Collections.Generic.Dictionary<string, string>()
{{"coinamount","1500"}, //Purchase arguments
{"currency","USD"},
{"amountdesc" ,"1500 Coins"}},
//Success handler
(info) => {
//Pass parameters to javascript...
Debug.Log(info);
},
//Error handler
(e) => Debug.Log("Unable to buy coins" + e)
);

I get the error:

InvalidPurchaseArguments; You need to set up exchange rates in the admin panel to be able to buy coins through UltimatePay.

What can be wrong there?
Last edited by sebas77 on September 23rd, 2013, 1:57 pm, edited 3 times in total.
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm

Re: Error with GetBuyCoinsInfo

Postby Henrik » August 16th, 2013, 5:46 pm

Hm, that shouldn't happen, looks like a bug.

We'll try to get it fixed as soon as possible. In the meantime, try adding a second pricepoint to your setup, does that make it work?
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Error with GetBuyCoinsInfo

Postby sebas77 » August 18th, 2013, 11:28 am

you mean another coinamount?
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm

Re: Error with GetBuyCoinsInfo

Postby sebas77 » August 19th, 2013, 11:02 am

I tried all the combinations, including using other currencies. Get always the same error.

Just to be thorough, this is what we put in the admin panel:

Target currency: USD
Exchange rates:1000EUR=1334,1000GBP=1562
UltimatePay Coin Price Points:100USD=50,500USD=300,1000USD=700,1000EUR=50,1000GBP=50

please keep us updated, we need to test the monetization features asap.
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm

Re: Error with GetBuyCoinsInfo

Postby sebas77 » August 20th, 2013, 11:09 am

I assume you are already having a look at the issue, could you please keep us updated?

I know I am nagging you, but this is crucial for us at this point of the development.
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm

Re: Error with GetBuyCoinsInfo

Postby sebas77 » August 21st, 2013, 10:32 am

Could really do with some help on this issue from the dev team at PlayerIO. We really want to begin monetizing ASAP and this is currently a blocker for us making any progress on that.
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm

Re: Error with GetBuyCoinsInfo

Postby mindjolt » August 22nd, 2013, 12:03 am

see this link for the new param names and your error should be resolved:
http://playerio.com/documentation/payva ... facebookv2
mindjolt
 
Posts: 1
Joined: July 26th, 2011, 2:59 pm

Re: Error with GetBuyCoinsInfo

Postby sebas77 » August 22nd, 2013, 10:31 am

mindjolt wrote:see this link for the new param names and your error should be resolved:
http://playerio.com/documentation/payva ... facebookv2


Hi mindjolt, thanks for the link, but we do not use facebook.
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm

Re: Error with GetBuyCoinsInfo

Postby sebas77 » August 23rd, 2013, 10:38 am

for the time being we switched to paypal since we are urged to test monetization as soon as possible, but the fact that we are not getting feedback on this issue is leaving us uneasy.
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm

Re: Error with GetBuyCoinsInfo

Postby sebas77 » August 27th, 2013, 12:11 pm

an update here,

so currently we don't have anymore the "InvalidPurchaseArguments; You need to set up exchange rates in the admin panel to be able to buy coins through UltimatePay." error, which could have been something wrong on our side (although I think we tested all the possible combinations, anyway now we don't get it anymore).

However when I call

Code: Select all
Application.OpenURL("https://www.ultimatepay.com/app/api/live/?sn="+info["sn"]+"&userid="+
                     info["userid"]+"&language=en&hash="+info["hash"]
                     +"&amount="+info["amount"]);


resulting in this string:

Code: Select all
https://www.ultimatepay.com/app/api/live/?sn=XXXX&userid=180204240&language=en&hash=XXXXXXXXXXXXXXXXXX&amount=1.00

which should be enough according ultimate doc, I get from ultimate pay:

Token missing...

which, I have to say, is the same result I get if I use the ultimate pay API directly.

Paypal works fine instead (however we won't use paypal on our final game)

By the way, why don't you generate the URL like it happens for paypal, instead to let me create it manually?
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm

Re: Error with GetBuyCoinsInfo

Postby sebas77 » September 23rd, 2013, 12:38 pm

token missing solved, we have again the exchange rates issue :| :cry:
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm

Re: Error with GetBuyCoinsInfo

Postby sebas77 » September 23rd, 2013, 12:55 pm

solution for the "InvalidPurchaseArguments; You need to set up exchange rates in the admin panel to be able to buy coins through UltimatePay" error:

ok I understood the problem...your ultimatePay code uses Paypal exchange rates to work!

If I fill in the Paypal exchange rates, I won't have the bug anymore.
Last edited by sebas77 on September 25th, 2013, 10:32 am, edited 3 times in total.
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm

Re: Error with GetBuyCoinsInfo

Postby sebas77 » September 23rd, 2013, 1:04 pm

Solution for the missing token error:

Second bug is the way you compute the hash. The hash cannot be computed anymore the way you do it, it must use this format now:

Code: Select all
string hash = time+":"+(info["userid"]+"UltimatePayAdminPasswordUltimatePaySecretPhrasecurrency"+info["currency"]+info["amount"]+info["merchtrans"]+time).CalculateSHA256Hash();

where time is epochtime

the final URL to use is:

Code: Select all
string url = "https://www.ultimatepay.com/app/api/live/?sn="+info["sn"]+
               "&userid="+info["userid"]+
               "&language=en&hash="+info["hash"]+
               "&amount="+info["amount"]+
               "&currency=USD"+
               "&display=Lightbox&method=StartOrderFrontEnd"+
               "&merchtrans="+info["merchtrans"]+
               "&amountdesc="+info["amountdesc"];


so basically you need also to update the way the hashcode is computed

more info here: https://docs.playspan.com/download/atta ... 9778391575

Now, we got ultimate pay to work properly, but I cannot compute the hash on the client...therefore if you won't fix it soon, I will be forced to create my own service to do it.
Last edited by sebas77 on September 25th, 2013, 10:32 am, edited 1 time in total.
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm

Re: Error with GetBuyCoinsInfo and UltimatePay

Postby AdamW » September 24th, 2013, 9:37 pm

Hello Sebas77,

Sorry to be out of touch, we'll be more responsive going forward. I see in the other thread:

viewtopic.php?f=37&t=35072

you say you have the solution, but wanted to follow-up with the end of this thread where you are asking about the potential fix. I'll bring this to the tech team's attention and get back to you shortly.

AW
Yahoo Games - Forums Moderator
User avatar
AdamW
 
Posts: 18
Joined: May 30th, 2013, 9:03 pm

Re: Error with GetBuyCoinsInfo and UltimatePay

Postby sebas77 » September 25th, 2013, 10:31 am

yes the solution is explained in the last 2 posts of this thread ;)
sebas77
Paid Member
 
Posts: 137
Joined: June 25th, 2013, 12:09 pm


Return to PayVault



cron