PayPal\Api\Details::setInsurance PHP Method

setInsurance() public method

Amount being charged for the insurance fee. Only supported when the payment_method is set to paypal.
public setInsurance ( string | double $insurance )
$insurance string | double
    public function setInsurance($insurance)
    {
        NumericValidator::validate($insurance, "Insurance");
        $insurance = FormatConverter::formatToPrice($insurance);
        $this->insurance = $insurance;
        return $this;
    }