Hi,
How can I set the price at runtime while using PayPal in Unity with PlayFab?
I found the PurchaseItemRequest() API which has a input parameter Price. Can this be used for PayPal?
Hi,
How can I set the price at runtime while using PayPal in Unity with PlayFab?
I found the PurchaseItemRequest() API which has a input parameter Price. Can this be used for PayPal?
The PayPal payment flow uses StartPurchase and PayForPurchase, not PurchaseItem. Those APIs do not support client-side price overrides. From a spoofing and tampering perspective, you probably wouldn't want them to anyway.
Can you go into more detail as to why you'd need client-side overrides? The Monetization features built into PlayFab allow for fairly dynamic store pricing options.
Sorry @Andy. I glossed over the fact that we could specify the quanity of items that player needs to buy in the StartPurchase API. By setting a base price for the item I would be able to change the total price by altering the quantitiy parameter. Is this understanding correct?
Absolutely. For each item in the payload of the StartPurchase call you can set a quantity. We would then, when you call PayForPurchase, calculate the amount to charge the player.
@shyam, Your previous comment disappeared, but I think you were asking about problems you encountered setting a quantity on a cart item. You can share more details?
The payment that is made in our app will be greater than or equal to $0.01. So for $6.58 the quantity parameter will be 658. Can the limit be increased? How to use bundles in this scenario?
The error obtained when quantity exceeds 25 is given below.
/Client/StartPurchase PlayFabError(InvalidParams, Invalid quantity in cart: item ID=Spot, 400 BadRequest
The limit is a global limit and cannot be increased for your title. A bundle is a collection of items and quantities in a catalog that are made available at a fixed price on a store. There's more information about them here: https://api.playfab.com/docs/tutorials/landing-commerce/catalogs. So, for instance, you could have a bundle of 500 instances of your item and price it at $5.00. Then, when you call StartPurchase, you only need to pass in the bundle and a quantity of one, instead of the individual item and a quantity of 500.
1. What is your target platform?
Android and iOS devices
2. Who is your payment provider?
Paypal
3. What is the experience of a player selecting items for a "cart"?
I am not able to understand this question.
4. What exactly is the player buying? Is it VC?
There are weekly contests and to play the contest they need to spend real money. The contest prices will be different for each contest.
5. What is the Title ID? Looking at your setup may yield more info.
Title ID is 9C99.
Then I'm completely at a loss. You cannot use the StartPurchase flow on iOS and Android - you have to use their marketplace for all real-world purchases. You would then use our receipt validation calls to check that the purchases are unique and valid, and to add the items to the player account. Apple in particular are very specific about this - there are some limited markets where you can use external payment providers on Android, but that's really the exception.
3 People are following this question.