Payments API Updates

This commit is contained in:
Jay Patel
2015-10-02 14:25:46 -05:00
parent 02fca1bda4
commit a37b880e96
112 changed files with 3857 additions and 1495 deletions

View File

@@ -13,15 +13,17 @@ class PaymentOptionsTest extends \PHPUnit_Framework_TestCase
{
/**
* Gets Json String of Object PaymentOptions
*
* @return string
*/
public static function getJson()
{
return '{"allowed_payment_method":"TestSample"}';
return '{"allowed_payment_method":"TestSample","recurring_flag":true,"skip_fmf":true}';
}
/**
* Gets Object Instance with Json data filled in
*
* @return PaymentOptions
*/
public static function getObject()
@@ -32,6 +34,7 @@ class PaymentOptionsTest extends \PHPUnit_Framework_TestCase
/**
* Tests for Serialization and Deserialization Issues
*
* @return PaymentOptions
*/
public function testSerializationDeserialization()
@@ -39,6 +42,8 @@ class PaymentOptionsTest extends \PHPUnit_Framework_TestCase
$obj = new PaymentOptions(self::getJson());
$this->assertNotNull($obj);
$this->assertNotNull($obj->getAllowedPaymentMethod());
$this->assertNotNull($obj->getRecurringFlag());
$this->assertNotNull($obj->getSkipFmf());
$this->assertEquals(self::getJson(), $obj->toJson());
return $obj;
}
@@ -50,5 +55,9 @@ class PaymentOptionsTest extends \PHPUnit_Framework_TestCase
public function testGetters($obj)
{
$this->assertEquals($obj->getAllowedPaymentMethod(), "TestSample");
$this->assertEquals($obj->getRecurringFlag(), true);
$this->assertEquals($obj->getSkipFmf(), true);
}
}