protected function setShippingDiscount($data)
    {
        if (isset($data['shipping_discount'])) {
            if ($data['shipping_discount'] > 0) {
                $data['shipping_discount'] *= -1;
            }

            $this->post = $this->post->merge([
                'PAYMENTREQUEST_0_SHIPDISCAMT' => $data['shipping_discount'],
                'PAYMENTREQUEST_0_AMT'         => round($data['total'] + $data['shipping_discount'], 2),
            ]);
        }
    }
protected function setShippingDiscount($data)
    {
        if (isset($data['shipping_discount'])) {
            if ($data['shipping_discount'] > 0) {
                $data['shipping_discount'] *= -1;
            }

            $this->post = $this->post->merge([
                'PAYMENTREQUEST_0_SHIPDISCAMT' => $data['shipping_discount'],
                'PAYMENTREQUEST_0_AMT'         => round($data['total'] + $data['shipping_discount'], 2),
            ]);
        }
    }
protected function setShippingDiscount ( $ data ) { if ( isset ( $ data [ 'shipping_discount' ] ) ) { if ( $ data [ 'shipping_discount' ] > 0 ) { $ data [ 'shipping_discount' ] *= - 1 ; } $ this -> post = $ this -> post -> merge ( [ 'PAYMENTREQUEST_0_SHIPDISCAMT' => $ data [ 'shipping_discount' ] , 'PAYMENTREQUEST_0_AMT' => round ( $ data [ 'total' ] + $ data [ 'shipping_discount' ] , 2 ) , ] ) ; } }
Set shipping discount if available.

@param array $data
Set shipping discount if available .