Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Improve totals reading at PaymentPaypal/Model/Abstract.php #239

Open
vovayatsyuk opened this issue Jan 23, 2013 · 0 comments
Open

Improve totals reading at PaymentPaypal/Model/Abstract.php #239

vovayatsyuk opened this issue Jan 23, 2013 · 0 comments
Labels

Comments

@vovayatsyuk
Copy link
Contributor

http://axiscommerce.com/forum/paypal-express-error#comment-91151

A lot of code is used direct reading of collects, but they could be undefined, which will produce an error.

For example:

    $optionsST['TAXAMT']      = round(
        $this->getAmountInBaseCurrency(
            $orderTotals['tax']['total'] + $orderTotals['shipping_tax']['total']
        ),
        2
    );

    $orderTotals['shipping_tax']['total'] - could be undefined

This code should be changed to

getTotal()->getTotal('shipping_tax') - should return float number
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant