diff --git a/lib/PayPal/Api/Capture.php b/lib/PayPal/Api/Capture.php index 8358bfd7..cfec87c4 100644 --- a/lib/PayPal/Api/Capture.php +++ b/lib/PayPal/Api/Capture.php @@ -214,6 +214,29 @@ public function getTransactionFee() return $this->transaction_fee; } + /** + * A free-form field that clients can use to send a note to the payer. + * + * @param string $note_to_payer + * + * @return $this + */ + public function setNoteToPayer($note_to_payer) + { + $this->note_to_payer = $note_to_payer; + return $this; + } + + /** + * A free-form field that clients can use to send a note to the payer. + * + * @return string + */ + public function getNoteToPayer() + { + return $this->note_to_payer; + } + /** * The date and time of capture, as defined in [RFC 3339 Section 5.6](http://tools.ietf.org/html/rfc3339#section-5.6). * diff --git a/tests/PayPal/Test/Api/CaptureTest.php b/tests/PayPal/Test/Api/CaptureTest.php index 213be3ab..24a2a9a4 100644 --- a/tests/PayPal/Test/Api/CaptureTest.php +++ b/tests/PayPal/Test/Api/CaptureTest.php @@ -19,7 +19,7 @@ class CaptureTest extends TestCase */ public static function getJson() { - return '{"id":"TestSample","amount":' .AmountTest::getJson() . ',"is_final_capture":true,"state":"TestSample","reason_code":"TestSample","parent_payment":"TestSample","invoice_number":"TestSample","transaction_fee":' .CurrencyTest::getJson() . ',"create_time":"TestSample","update_time":"TestSample","links":' .LinksTest::getJson() . '}'; + return '{"id":"TestSample","amount":' .AmountTest::getJson() . ',"is_final_capture":true,"state":"TestSample","reason_code":"TestSample","parent_payment":"TestSample","invoice_number":"TestSample","transaction_fee":' .CurrencyTest::getJson() . ',"note_to_payer":"TestSample","create_time":"TestSample","update_time":"TestSample","links":' .LinksTest::getJson() . '}'; } /** @@ -48,6 +48,7 @@ public function testSerializationDeserialization() $this->assertNotNull($obj->getParentPayment()); $this->assertNotNull($obj->getInvoiceNumber()); $this->assertNotNull($obj->getTransactionFee()); + $this->assertNotNull($obj->getNoteToPayer()); $this->assertNotNull($obj->getCreateTime()); $this->assertNotNull($obj->getUpdateTime()); $this->assertNotNull($obj->getLinks()); @@ -69,6 +70,7 @@ public function testGetters($obj) $this->assertEquals($obj->getParentPayment(), "TestSample"); $this->assertEquals($obj->getInvoiceNumber(), "TestSample"); $this->assertEquals($obj->getTransactionFee(), CurrencyTest::getObject()); + $this->assertEquals($obj->getNoteToPayer(), "TestSample"); $this->assertEquals($obj->getCreateTime(), "TestSample"); $this->assertEquals($obj->getUpdateTime(), "TestSample"); $this->assertEquals($obj->getLinks(), LinksTest::getObject());