public function testRefund() { self::authorizeFromEnv(); $receiver = $this->createTestBitcoinReceiver("*****@*****.**"); $receiver = BitcoinReceiver::retrieve($receiver->id); $this->assertNull($receiver->refund_address); $refundAddress = "REFUNDHERE"; $receiver->refund(array("refund_address" => $refundAddress)); $this->assertSame($refundAddress, $receiver->refund_address); }
public function testUpdateWithoutCustomer() { self::authorizeFromEnv(); $receiver = $this->createTestBitcoinReceiver("*****@*****.**"); $receiver->description = "a new description"; $receiver->save(); $this->assertEquals(BitcoinReceiver::classUrl() . "/" . $receiver['id'], $receiver->instanceUrl()); $updatedReceiver = BitcoinReceiver::retrieve($receiver->id); $this->assertEquals($receiver["description"], $updatedReceiver["description"]); }