show facebook product price in local currency - facebook

I have some Items in my game that can be bought.
I need to show the price in local currency BEFORE user click "buy".
It is easy, when the default price is in USD,
so that I call
FB.api('/me/?fields=currency')
and as an response I get
user_currency
usd_exchange_inverse
With that, local price is:
PRICE_IN_USD * usd_exchange_inverse.
But what if default price is in EURO?
It seems that I need to get exchange rate from EURO to LOCAL CURRENCY.
But how?
thanks

Related

Huawei IAP - Currency conversion is not correct

In Huawei HMS services, i have integrated IAP kit in my application. IAP currency configured as INR, however for the region Cambodia (KH)-the converted currency value with respect to the pack is incorrect.
In my AppGallery console, product management page, the conversion is 11.99 for KHR-Cambodian currency. But the settlement the conversion is different.
Please can somebody check and let me know how to set conversion correct.
Select a country or region and its currency to be displayed by default, set Default price (tax included), and select a sorting rule. Then, select the countries and regions for which you want to convert prices based on exchange rates and click Convert prices to calculate their local prices.
For details , please refer to: https://developer.huawei.com/consumer/en/doc/distribution/app/agc-help-create-product-0000001099854866
Please Note:
After you click Convert prices, local prices for the selected countries and regions are calculated based on exchange rates and conversion rules.
You can also manually change a product price for a specified country or region on the list as required.
If a message displays, indicating that no exchange rate is found when you convert the price for a country or region, you need to manually enter the product price.
Huawei will update the exchange rates every day but will not update the product prices you have saved. You need to manually update the prices as required.
Click this link https://developer.huawei.com/consumer/en/doc/start/merchant-service-0000001053025967#section154132916309 to view tax rates of different countries and regions.

Load multicurrency by csv Prestashop

I want to add products by csv files with prices in hryvnas(ukrainian currency) and euros. My main currency is hryvna.
So euro prices should be converted to hryvnas. I know that it is a standard functionality, but how can I load products with euro prices?
just loads a product price in csv is assigned to your default currency.
There is no user charging for other currencies. The CMS automatically converts the price for all other active currencies in your store

can't pay with undefined currency in facebook Local Currency Payments

my app product defined USD,and not defined GBP.when I use GBP to pay, the pay dialog return
the error that Sorry, there was a problem and we can’t complete your request. Please try again later.
I'm confusion about that,the facebook offical doucument show that If you do not define a price point for a particular local currency, users of that currency will have their price automatically calculated based upon the current exchange rate between the first currency you specify and that target currency.
Can anyone help me?
Could it be that you were trying 0.01 USD? that converts to less than 0.01 GBP
Defining a single unit of in-game currency that has a product:price:amount less than 0.01. For example, selling 1,000 Coins for USD 1.00 would require a unit price of 0.001, which is not supported.
https://developers.facebook.com/docs/howtos/payments/definingproducts/#pricing_static

PayPal amount_x in IPN?

What's variable name for amount_x (item price) that is submited back from PayPals IPN?
Im searching everywhere but cant find the name of this item price variable in IPN?!
I can get it like:
$_POST['mc_gross_'.$i] / $_POST['quantity'.$i]
But I'm not sure because of rounding, etc.
$_POST['mc_gross'] is the total amount for the payment. Are you wanting individual item prices?

Paypal IPN using PHP to get customized Quantity and Amount

I have downloaded the sample paypal IPN script using php and customised with the email for the buyout option and it has also some hidden paramaters such as amount, quantity,return_url, notify_url like this. My main idea is to do the buyout option for the product purchase in my website.The current calculation for the product purchase is as follows:
Item Price:$20
Quantity :10
Total amount $200
I need the calculation to some different way as our site have some static set of quantities and prices, so our point of calculation is as follows:
Item Price:$20
Quantity :10
Total amount:$20
So, the total amount needs to be the same for the given number of quantities.The IPN configuration doesn't allow me to change the quantity field by this way, please suggest some ideas to overcome this issue.
The item price is price per item, the quantity is of course multiplied by the item price. Your second example should have $2 as the --Item-- price. If you want to sell "10 items for $20", I think you will need to make a new item for that combo and just but the actual quantity in a custom field.
If you want to use the same item and paypal's quantity field, I think you need to look into calculating a discount and making that part of the parameters (discount_amount_cart or discount_amount_X for item X I think).