PayPal\Api\Refund::setAmount PHP Method

setAmount() public method

Details including both refunded amount (to payer) and refunded fee (to payee). 10 characters max.
public setAmount ( Amount $amount )
$amount Amount
    public function setAmount($amount)
    {
        $this->amount = $amount;
        return $this;
    }

Usage Example

コード例 #1
1
 public function refundSale($saleId, $refundAmount, $currency = CurrencyConst::EURO)
 {
     $apiContext = $this->connectionService->getApiContext();
     $amount = new Amount();
     $amount->setCurrency($currency)->setTotal($refundAmount);
     $refund = new Refund();
     $refund->setAmount($amount);
     $sale = new Sale();
     $sale->setId($saleId);
     $refundSale = $sale->refund($refund, $apiContext);
     return $refundSale;
 }
All Usage Examples Of PayPal\Api\Refund::setAmount