PayPal\Api\Refund::setId PHP Method

setId() public method

ID of the refund transaction. 17 characters max.
public setId ( string $id )
$id string
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @group integration
  */
 public function testOperations()
 {
     try {
         $authId = AuthorizationTest::authorize();
         $auth = Authorization::get($authId);
         $amount = new Amount();
         $amount->setCurrency("USD");
         $amount->setTotal("1.00");
         $captr = new Capture();
         $captr->setId($authId);
         $captr->setAmount($amount);
         $capt = $auth->capture($captr);
         $captureId = $capt->getId();
         $this->assertNotNull($captureId);
         $refund = new Refund();
         $refund->setId($captureId);
         $refund->setAmount($amount);
         $capture = Capture::get($captureId);
         $this->assertNotNull($capture->getId());
         $retund = $capture->refund($refund);
         $this->assertNotNull($retund->getId());
     } catch (PayPalConnectionException $ex) {
         $this->markTestSkipped('Tests failing because of intermittent failures in Paypal Sandbox environment.' . $ex->getMessage());
     }
 }
All Usage Examples Of PayPal\Api\Refund::setId