protected function setUp() { Apruve\Client::init('a key', Apruve\Environment::DEV()); $this->payment = new Payment(["amount_cents" => 6000, "currency" => "USD", "merchant_notes" => null, "payment_items" => [['title' => 'test', 'amount_cents' => 100, 'quantity' => 1, 'price_ea_cents' => 100]]]); }
protected function setUp() { $this->item = new PaymentItem(['title' => 'A title', 'amount_cents' => 3400, 'quantity' => 1, 'price_ea_cents' => 3400, 'merchant_notes' => 'some notes.', 'description' => 'a description.', 'variant_info' => 'some variation.', 'sku' => 'a sku', 'vendor' => 'ACME', 'view_product_url' => 'A Url.'], $this->getMockBuilder('Apruve\\Client')->setConstructorArgs(['a key', Apruve\Environment::DEV()])->getMock()); }
public function testToSecureHash() { Apruve\Client::init('a key', Apruve\Environment::DEV()); $this->assertEquals(hash('sha256', 'a keyasdf1234order12346000USD50010002014-07-15T10:12:27-05:00a title4500'), $this->pr->toSecureHash()); }
public function initClient() { return Apruve\Client::init(self::$AN_API_KEY, Apruve\Environment::DEV()); }
public function testClientInjection() { $this->client = Apruve\Client::init('a key', Apruve\Environment::DEV()); $this->assertEquals($this->client->getApiKey(), $this->object->getClient()->getApiKey()); }
protected function setUp() { Apruve\Client::init('a key', Apruve\Environment::DEV()); $this->subscription_adjustment = new SubscriptionAdjustment(['title' => 'test', 'amount_cents' => 100, 'quantity' => 1, 'price_ea_cents' => 100]); }