Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Setting currency dynamically for multiple currency app.  #4

Copy link
Copy link
Open
@devlimon

Description

@devlimon
Issue body actions

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.