diff --git a/src/Traits/PayPalAPI/Subscriptions/Helpers.php b/src/Traits/PayPalAPI/Subscriptions/Helpers.php index 054304cf..ecba57c1 100644 --- a/src/Traits/PayPalAPI/Subscriptions/Helpers.php +++ b/src/Traits/PayPalAPI/Subscriptions/Helpers.php @@ -338,7 +338,6 @@ public function addProduct(string $name, string $description, string $type, stri if ($error = data_get($product, 'error', false)) { throw new \RuntimeException(data_get($error, 'details.0.description', 'Failed to add product')); } - $this->product = $product; return $this; @@ -438,7 +437,7 @@ public function addSetupFee(float $price): \Srmklive\PayPal\Services\PayPal $this->payment_preferences = [ 'auto_bill_outstanding' => true, 'setup_fee' => [ - 'value' => $price, + 'value' => bcdiv($price, 1, 2), 'currency_code' => $this->getCurrency(), ], 'setup_fee_failure_action' => 'CONTINUE',