芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/bit-alphas-ltd.com/user/project/vendor/razorpay/razorpay/tests/AddonTest.php
api->subscription->create(array('plan_id' => $this->plan, 'customer_notify' => 1,'quantity'=>1, 'total_count' => 6, 'addons' => array(array('item' => array('name' => 'Delivery charges', 'amount' => 3000, 'currency' => 'INR'))),'notes'=> array('key1'=> 'value3','key2'=> 'value2'))); $data = $this->api->subscription->fetch($subscription->id)->createAddon(array('item' => array('name' => 'Extra Chair', 'amount' => 3000, 'currency' => 'INR'), 'quantity' => 1)); $this->assertTrue(is_array($data->toArray())); $this->assertTrue(is_object($data['item'])); } /** * Fetch Subscription Link by ID */ public function testFetchSubscriptionLink() { $data = $this->api->addon->fetch($this->addonId); $this->assertTrue(is_array($data->toArray())); $this->assertTrue($data['entity']=='addon'); } /** * Fetch all addons */ public function testFetchAllAddon() { $data = $this->api->addon->fetchAll(); $this->assertTrue(is_array($data->toArray())); $this->assertTrue(is_array($data['items'])); } }