Payment problem

Maniaplanet public API, ManiaConnect system and the open source PHP SDK.

Moderator: NADEO

Post Reply
User avatar
steppie
Translator
Translator
Posts: 96
Joined: 25 Apr 2011, 21:55
Location: Denmark

Payment problem

Post by steppie »

I've tried to get the payment to work, but when i call $p->create($t) I'm getting a Unauthorized exception

And next questions, how do I make a shot redirect? Do I have to use a maniacode to do that,
as you can't use header location?
Image
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: Payment problem

Post by magnetik »

The best way to tell if the transaction issue comes from us : try ManiaLoto. Since it's using the same come as the one given, if it does not work it's an issue on our side.

Having a little more of your code may help :)
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
User avatar
steppie
Translator
Translator
Posts: 96
Joined: 25 Apr 2011, 21:55
Location: Denmark

Re: Payment problem

Post by steppie »

Found the problem, my fault! :teub:

I've used this:

Code: Select all

$p = new \Maniaplanet\WebServices\Payments('API_USERNAME','API_PASSWORD');
instead of this:

Code: Select all

$p = new \Maniaplanet\WebServices\Payments(API_USERNAME,API_PASSWORD);
So now I'm getting a transactionid, but I still don't know how to redirect to a short url?
Image
The_Big_Boo
Posts: 1026
Joined: 15 Jun 2010, 15:46

Re: Payment problem

Post by The_Big_Boo »

To make a redirection with manialinks, just send an xml file with only a redirect tag like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<redirect>shortag?transaction=xxx</redirect>
OS: Win 7 Pro x64
RAM: 2x4GB Corsair @ 1600MHz
CPU: Intel i5 760 @ 3.6GHz
Mobo: Asus P7P55D-E
GPU: NVidia GTX 760 2GB
HDD: WD Black 1TB
Sound: VIA VT1828S (onboard)
Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310
User avatar
steppie
Translator
Translator
Posts: 96
Joined: 25 Apr 2011, 21:55
Location: Denmark

Re: Payment problem

Post by steppie »

Thanks,

I did it another way, by making the "pay button" do the redirect.

But now it seems as the payment is taking planets before I confirm the payment?
Do the planets return if I refuses the payment?

[Edit]
On further test I can see that it's one planet thats taken from my account when the payment is requested,
Is that a "hidden" nadeo tax for using it?
Image
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

Re: Payment problem

Post by gouxim »

In TMF it used to cost 1 or 2 Coppers to create a transaction, I suppose it's the same in Maniaplanet :?:
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
ethido
Posts: 9
Joined: 16 Aug 2011, 20:41

Re: Payment problem

Post by ethido »

gouxim wrote:In TMF it used to cost 1 or 2 Coppers to create a transaction, I suppose it's the same in Maniaplanet :?:
Are there any News about this? Just wanna know, if the 1 Planet Tax is also going to Nadeo, if the Player cancels the Transaction. Because this could mean, that a Player can repeatedly open such a Transactionslink till I'm poor ;).


Sorry for reopening after such a long time
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: Payment problem

Post by magnetik »

No problem for reopening

I'm quite sure that there is no tax if the transaction is cancelled.

Have you tried making a transaction to check it?
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
ethido
Posts: 9
Joined: 16 Aug 2011, 20:41

Re: Payment problem

Post by ethido »

magnetik wrote: I'm quite sure that there is no tax if the transaction is cancelled.

Have you tried making a transaction to check it?
Yes, I have made a Dedi-Account to test it (entered the Dediaccount as "creatorLogin" and the "creatorPassword"). Then I made some Transactions on a Test-Manialink and always cancelled the Transaction.

Before the Transactions there were 87 Planets on the Account, after 17 Transactions (all cancelled) there are now only 70 Planets on the Account. This was yesterday at around 12:00, now nearly 24 Hours later, there are still only the 70 planets on the Serveraccount.
-> means that the 1 Planet Tax is also going to Nadeo if a Transaction is cancelled...

(Used a Serveraccount, because on my normal Login there is too many Planets income to observe this ;))
ethido
Posts: 9
Joined: 16 Aug 2011, 20:41

Re: Payment problem

Post by ethido »

Observed it now for more than a week. Created many Transactions and the 1 Planet-Tax is taken away from the $t->creatorlogin, no matter if its paid or cancelled...

Because of that I had to add a "Anti-TaxSpam" to my code which only allows a Login to create 10 unpaid Transactions a day, to prevent me getting poor by taxes...

By far not a great solution. So is this intended to take the Tax for an unpaid Transactions or will this change? ;)
Post Reply

Return to “Maniaplanet Web Services”

Who is online

Users browsing this forum: No registered users and 0 guests