Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.
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

@vovayatsyuk

Description

@vovayatsyuk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions