Forum PayVault Pop-ups blocked pain

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

Pop-ups blocked pain

Postby wildbunny » July 27th, 2011, 5:52 pm

Hi guys,

Just found out that all the major browsers will block pop-ups from action-script when opened from anything but a TextField with the link in the htmlText portion...

Trouble is, I need to call out to client.payVault.getBuyCoinsInfo("paypal",...) in order to get the URL to send the user to, so I can't stick this in the text field.

So, is this URL fixed and available somewhere so that I can stick it in the htmlText?

I can't really have the user follow the link in the same page (i.e. target="_self") because that would break the entire flow of the game...

Cheers, Paul.
wildbunny
 
Posts: 217
Joined: March 9th, 2011, 10:35 am

Re: Pop-ups blocked pain

Postby wildbunny » July 27th, 2011, 6:15 pm

Ok, scratch what I said above, its rubbish....

:)

The reason the pop-ups are blocked is due to the delay between the user clicking a button and the call to navigateToUrl().

This delay is because the of the call to client.payVault.getBuyCoinsInfo( "paypal"), which must do a web-request.

Now, looking at the URL which is generated from this call, it looks like fairly standard PayPal request stuff. I am OK to bake my own version of this request URL using snippets from the result I get from getBuyCoinsInfo( "paypal")? Or are the return URLs going to change often?

Cheers, Paul.
wildbunny
 
Posts: 217
Joined: March 9th, 2011, 10:35 am

Re: Pop-ups blocked pain

Postby wildbunny » July 27th, 2011, 6:56 pm

Ok, the only thing which worries me about trying to bake my own PayPal url is this query parameter:

invoice=payvault320648

Where that number is always different... Obviously its something on your server side.
wildbunny
 
Posts: 217
Joined: March 9th, 2011, 10:35 am

Re: Pop-ups blocked pain

Postby Henrik » July 27th, 2011, 7:55 pm

Sadly there's no good way to avoid the popup-blockers, but what you can do is to call PayVault before you show the button that will open the popup. Do not try to bake the PayPal url yourself.

Obviously, you want some sort of two-step flow so that users first click a button to buy stuff in your game, then you call PayVault, get some urls, and show the buttons that will open the popup windows. You don't want to be calling PayVault every time a user logs in or reloads the game or something. :-)
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Pop-ups blocked pain

Postby wildbunny » July 27th, 2011, 8:08 pm

Henrik wrote:Sadly there's no good way to avoid the popup-blockers, but what you can do is to call PayVault before you show the button that will open the popup. Do not try to bake the PayPal url yourself.


Hmmm, but I have say 10 different choices of item - so do I need to make 10 payvault calls at the start of the game, record the URLs generated and then use those when the user clicks?

What about that field 'invoice=payvault320648' - if I issue two transactions with the same invoice parameter, won't that mess up your systems?

Cheers, Paul.
wildbunny
 
Posts: 217
Joined: March 9th, 2011, 10:35 am

Re: Pop-ups blocked pain

Postby Henrik » July 27th, 2011, 9:02 pm

wildbunny wrote:Hmmm, but I have say 10 different choices of item - so do I need to make 10 payvault calls at the start of the game, record the URLs generated and then use those when the user clicks?

Yes, but don't have 10 different choices, that's probably way too many.

wildbunny wrote:What about that field 'invoice=payvault320648' - if I issue two transactions with the same invoice parameter, won't that mess up your systems?

Each 'invoice' in the PayPal system can only be paid once, so if a user clicks it, pays it, and then clicks the thing again, PayPal will say that it's already paid. So what you should do is to spawn the PayPal window, and start refreshing the Vault say every 5 seconds or so. Then you can detect if the amount of coins or items changes, and when it does, you remove the screen with all the PayPal buttons and show something to the user saying how AWESOME he or she is for buying stuff in your game. And then if they want to give you more money, they'll click the buy stuff button, and you'll call PayVault and get new URLs.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Pop-ups blocked pain

Postby Henrik » August 1st, 2011, 11:11 pm

This should make your life easier:

payvault-f37/coins-redirect-url-t1901
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm


Return to PayVault



cron