Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting currency dynamically for multiple currency app. #4

Open
devlimon opened this issue Jul 22, 2019 · 0 comments
Open

Setting currency dynamically for multiple currency app. #4

devlimon opened this issue Jul 22, 2019 · 0 comments

Comments

@devlimon
Copy link

devlimon commented Jul 22, 2019

Hello , Thanks for your nice paypal payment gateway integration process.all things are ok for me.but i have problem when i want to set currency dynamically . can you help?

$item_1->setName('Item 1') /** item name /
->setCurrency('USD')
->setQuantity(1)
->setPrice($request->get('amount')); /
unit price **/
$item_list = new ItemList();
$item_list->setItems(array($item_1));
$amount = new Amount();
$amount->setCurrency('USD')
->setTotal($request->get('amount'));

from the upper code i tried to change setCurrency('USD')
i tried to put a currency code dynamically instead 'USD' simply passing a variable along with paypal checkout form following the code: https://developer.paypal.com/docs/api/reference/currency-codes/ .

but shows this error:
Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/payment

thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant