getTestAccount()); } public function testPay() { $create = Factory::payment()->common()->create("Iphone6 16G", microtime(), "88.88", "2088002656718920"); $result = Factory::payment()->page()->pay("Iphone6 16G", $create->outTradeNo, "0.10", "https://www.taobao.com"); $this->assertEquals(true, strpos($result->body, 'alipay-easysdk-php-') > 0); $this->assertEquals(true, strpos($result->body, 'sign') > 0); } public function testPayWithOptionalNotify() { $create = Factory::payment()->common()->create("Iphone6 16G", microtime(), "88.88", "2088002656718920"); $result = Factory::payment()->page() ->asyncNotify("https://www.test2.com/newCallback") ->pay("Iphone6 16G", $create->outTradeNo, "0.10", "https://www.taobao.com"); $this->assertEquals(true, strpos($result->body, 'alipay-easysdk-php-') > 0); $this->assertEquals(true, strpos($result->body, 'sign') > 0); } }