question

miki123.by avatar image
miki123.by asked

PlayFab and PayPal integration problem

I've encountered a problem while configuring PlayFab to work with PayPal.

I've menaged to find my Merchant ID, but what is the "PayPal Return Link", how do I find it? What is the PlayFab's PayPal username? Please help.

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

We'll be updating with a tutorial on setting up payment providers for the StartPurchase flow soon, but here's how you need to set up PayPal (I'm also posting this to the forums, so that others can get this info more easily):

First, it's important to understand that this is all done via PayPal's Express Checkout flow, with PlayFab as a third-party shopping cart: https://developer.paypal.com/docs/classic/products/express-checkout/.

In your PayPal account, you need to grant us third-party permissions to take actions on your behalf: https://developer.paypal.com/docs/classic/admin/third-party/. The username to use for PlayFab in setting this is "billing_api1.playfab.com".

The Return Link you define for your title is the page you want players to be directed to when the purchase is completed or cancelled by the user. When the user is sent to that link, the Order ID and PlayFab ID will also be provided as parameters, so that you can query our service (via ConfirmPurchase) to see what the result of the purchase was.

10 |1200

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

miki123.by avatar image
miki123.by answered

Found it! PlayFab's PayPal username is "billing_api1.playfab.com". I still don't know what a Return Link is.

10 |1200

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

Nicklas Ruiterman avatar image
Nicklas Ruiterman answered

so PlayFab handles all the "Your Server" part of this diagram?


whats the timeline for the client side unity sdk integration / is this planned?

 

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

To be clear, we're integrated with Express Checkouts in PayPal specifically - not Braintree. We'll be integrating more payment options in future (one of which could be Braintree, if that's the one most people are asking for - we prioritize what the majority of the community needs).

Could you clarify what you're referring to, in terms of the Unity SDK? The PayPal payment flow is fully functional in all our SDKs already. What client integration are you looking for?

10 |1200

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

Nicklas Ruiterman avatar image
Nicklas Ruiterman answered

PlayFab Unity SDK

for example, OpenIAB is/was used for Android and iOS, (is PlayFabs own integrated IAP solution ready?)

so with PayPal Express Checkouts the payment flow takes you out of the game and into a browser?

 

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

As with the receipt validation flow (the OpenIAB use case), we don't control the client side of the operation, no. In the case of receipt validation, the client does need to query for the receipt that gets passed to us. Similarly, for PayPal payments, the client has to trigger the payment request for the user - we can't control that from the server side (for PayPal, at least - with Steam payments, the pay dialog is actually triggered by our service call to them, popping a client payment confirmation dialog via the Steam app).

10 |1200

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

Nicklas Ruiterman avatar image
Nicklas Ruiterman answered

Thanks again Brendan for all the information :)

Looking forward to the updated tutorials

10 |1200

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

mvalero avatar image
mvalero answered

I have a problem with ConfirmPurchase. a make a purchase in playfab using StartPurchase->PayForPurchase->paypal.i get the return link from paypal and the orderID, but when I try to use ConfirmPurchase i get this error:

 
{
  "code": 400,
  "status": "BadRequest",
  "error": "InvalidParams",
  "errorCode": 1000,
  "errorMessage": "Invalid input parameters",
  "errorDetails": {
    "OrderId": [
      "must fit within the range of UInt64"
    ]
  }
}

I'm using the ortherId return by paypal. and a can see the order in the player's purchases


untitled-1fw.png (93.3 KiB)
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
@mvalero

If you look at the response from the StartPurchase call, you'll see that the OrderId was passed back as "A2E929BD64892B1D". While under the covers, the ID is indeed a numeric value, it's a string in these calls, with it being the number in hexadecimal format. If you pass it in that way, you should be fine.

10 |1200

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

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.