question

angelsinhbfs avatar image
angelsinhbfs asked

paypal not authorized

when using 
PlayFabClientAPI.PayForPurchase(new PayForPurchaseRequest()
{
OrderId = orderId,
ProviderName = "PayPal",
Currency = "RM"
}, onPay, OnPlayfabError);

I get an error "Failed to initiate transaction with payment provider. PlayFab not authorized to perform acctions on given PayPal account."
not sure how to authorize playfab on my paypal account, and the docs say to follow the integration page, but i cant find that

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

So that everyone has the info, to enable PayPal payments via PlayFab, please ensure that you have set the third-party permissions (https://developer.paypal.com/docs/classic/admin/third-party/) in your PayPal account to allow "billing_api1.playfab.com" to process Express Checkout payments for you.

We'll make sure this is added to our PayPal setup documentation shortly.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

subsoap avatar image subsoap commented ·

I was looking how to setup properly, and did not notice any documentation?

0 Likes 0 ·
brendan avatar image brendan subsoap commented ·

Apologies for the delay - we do have a write-up of this that we need to post. Marco and I will work to make sure this gets posted this next week. However, I believe this post has the specific information you need to make sure your setup is correct: https://community.playfab.com/questions/638/208252737-PlayFab-and-PayPal-integration-problem.html

0 Likes 0 ·
brendan avatar image
brendan answered

The second part of the error is specifically what we receive from PayPal when attempting the transaction. I haven't seen that error before, though there are a number of ways that PayPal might deny a transaction for an account (https://developer.paypal.com/docs/api/#errors). The first thing I would check is that your Merchant ID is entered correctly for your title on the PayPal Add-ons page. If it is, is there another user account with which you could test, to see if this is account-specific?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

angelsinhbfs avatar image
angelsinhbfs answered

just got off the phone with their tech support which was less than helpful.
"Create your Express Checkout account with PayPal by visiting their signup page. Once you have an account, install this add-on, and enter your merchant ID or email address below. You will now be able to process real-money payments through PlayFab using PayPal. Follow the integration documentation for full details."
I did all of those things tried both email and merchant id. The return link i was not super sure about. The only info i could find on the web about a paypal return link was for paypal auto return, which sends a user back to the website that they started from but with a completed page. I set up one of those and put that there, that may be the weak link in this whole thing.

on their developers site I found
"If you are executing Express Checkout or other PayPal API operations on behalf of another merchant, you must obtain permission to execute them in production. In other words, the merchant for whom you execute API operations must grant permission to you so that you can perform the operation in production."

which seems like it might be causing the error, I dont know how to give playfab permission to do things. On the phone they seemed to think that you guys would be needing  an api signature or certificate and had me generate those. I guess ill be getting a call from their integrations team later. 

any help would be appreciated

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

angelsinhbfs avatar image
angelsinhbfs answered

*****Update*****
just got off the phone with their integrations team seems like its failing because when doing express checkout i need the Username for playfab so that I can give it permission to make calls on my paypal account. I cannot find this anywhere, neither could the person i talked to at paypal. 


10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

So that anyone following this thread is aware, we've been working with this developer via email to get to the bottom of this. Long story short, it looks like the updated Express Checkout setup in PayPal is missing our username - which is required for setup of your title in their system. We're getting this sorted now, and should have an update soon.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Senader avatar image
Senader answered

Same problem here! billing_api1.playfab.com has the rights for Express purchases and I'm following this tutorial => https://api.playfab.com/docs/non-receipt-purchasing.

I end up having a "Failed to initiate transaction with payment provider." with no submessage (using PlayFabError.GenerateErrorReport() in the C# SDK). Actually, even with no rights, the error is the same.

I checked the merchant ID, the redirect url and settings in PayPal... My business account is verified and the PayPal addon is installed in PlayFab (in my *_Dev Title).

@Brendan, do you have any idea why it explodes ? :(

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image brendan commented ·

Is that a live payment or Sandbox? If you've re-verified that you've granted us the appropriate third-party permissions, and that your merchant ID is correct in the configuration page, can you let me know which Title ID this is for?

0 Likes 0 ·
Senader avatar image Senader brendan commented ·

I use Live payment (mostly because I can't add the sandbox user as you can see in this image : http://imgur.com/a/O4WOU ) and verified the merchant ID & third party permissions (Express Checkout, and even everything actually, it's just a test account for now). I'm sending you the Title ID by PM

0 Likes 0 ·
Senader avatar image Senader brendan commented ·

Mb, no PM, so it's 4697

0 Likes 0 ·
brendan avatar image brendan Senader commented ·

Thanks! So what appears to be happening is that the PayPal transaction initialization is throwing an exception. We're not getting extra info on that from them, so let's look at the specifics of the call. Can you send me the specific parameters you're passing into each call (StartPurchase, etc.)? Feel free to open a ticket on this, if you'd prefer for to be private. We can sort out the details and post back here when we have the final answer.

0 Likes 0 ·
teemu avatar image
teemu answered

Getting the same behavior here. "Failed to initiate transaction... " with no submessage.

8 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image brendan commented ·

Same request, then - can you please send us all the details of the call (Title ID, PlayFab ID, parameters passed into the StartPurchase and PayForPurchase calls)?

0 Likes 0 ·
teemu avatar image teemu commented ·

In my case the startpurchase goes well I guess. I get the transaction ID and whatnot. Payforpurchase fails. I'm thinking could this be because of the old SDK? I've built my project by following your angrybots example, but I guess it contains some archaic verion. I've considered migrating to a newer one but that would be a lot of work at this stage since everyhing seems to explode.

    public void startPurchaseBack(StartPurchaseResult res)
    {
        Debug.Log("startpurchase succes");
        Debug.Log(res.OrderId);
        Debug.Log(res.PaymentOptions[0].Price);
        Debug.Log(res.PaymentOptions[0].StoreCredit);
        Debug.Log(res.PaymentOptions[0].ProviderName);
        PayForPurchaseRequest req = new PayForPurchaseRequest();
        req.OrderId = res.OrderId;
        req.ProviderName = "PayPal";
        req.Currency = "RM";
        PlayFabClientAPI.PayForPurchase(req, payBack, OnPlayFabError);
    }
0 Likes 0 ·
purchase.jpg (21.8 KiB)
brendan avatar image brendan teemu commented ·

Well, I would always recommend updating to the latest SDK, but since we haven't had any breaking changes, the older code should still be valid. What is the Title ID for this test?

0 Likes 0 ·
teemu avatar image teemu brendan commented ·

Thanks for the response. Our title ID is B166.

0 Likes 0 ·
info-2 avatar image info-2 commented ·

I would like to reference ticket 7620 here, which reports the same issue, where you've mentioned a bug in PayPal's library and a fix on your side. I've looked over the latest release notes but couldn't find any confirmation that the fix has been deployed yet. Maybe this is the same issue other users (like teemu) are running into now?

0 Likes 0 ·
brendan avatar image brendan info-2 commented ·

Thanks - it does indeed look like this issue has persisted. I'm working with the engineering team to get the fix for the PayPal library pushed live as soon as possible.

0 Likes 0 ·
info-2 avatar image info-2 brendan commented ·

Update: could not see any PayPal related fixes in the release notes, but just tried our (old) build out of curiousity and the PayPal payment link comes up as expected now. Fixed / thanks!

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.