コード例 #1
0
ファイル: PaymentItemTest.php プロジェクト: apruve/apruve-php
 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());
 }
コード例 #2
0
ファイル: PaymentTest.php プロジェクト: apruve/apruve-php
 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]]]);
 }
コード例 #3
0
 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());
 }
コード例 #4
0
ファイル: ClientTest.php プロジェクト: apruve/apruve-php
 public function initClient()
 {
     return Apruve\Client::init(self::$AN_API_KEY, Apruve\Environment::DEV());
 }
コード例 #5
0
 public function testClientInjection()
 {
     $this->client = Apruve\Client::init('a key', Apruve\Environment::DEV());
     $this->assertEquals($this->client->getApiKey(), $this->object->getClient()->getApiKey());
 }
コード例 #6
0
ファイル: EnvironmentTest.php プロジェクト: apruve/apruve-php
 public function testPRODGetBaseUrl()
 {
     $env = Apruve\Environment::PROD();
     $this->assertEquals('https://app.apruve.com', $env->getBaseUrl());
 }
コード例 #7
0
 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]);
 }