public function test_verifyIdentity() { $identity = new Identity($this->state); $identity->save(); $verification = $identity->verifyOn($this->verify_payload); $this->assertStringStartsWith('VI', $verification->id); $this->assertEquals($verification->state, "PENDING"); $this->assertEquals($verification->processor, "DUMMY_V1"); }
public function test_updateIdentity() { $this->markTestSkipped("Ignored until Identity can be updated"); $identity = new Identity($this->state); $identity->save(); $this->assertEquals($identity->entity['tax_id'], $this->state['entity']['tax_id']); $entity = $identity->entity; $entity['tax_id'] = '991111'; $identity->entity = $entity; $identity->save(); $this->assertEquals($identity->entity['tax_id'], '991111'); }
public static function setUpBeforeClass() { // TODO: identity must have a merchant account on DUMMY_V1 processor self::$identity = Identity::retrieve(SampleData::$identityId); // setup card $card = json_decode(self::PAYMENT_CARD_PAYLOAD, true); $card['identity'] = self::$identity->id; $card = new PaymentInstrument($card); $card->save(); self::$card = $card; }
public static function setUpBeforeClass() { self::$identity = Identity::retrieve(SampleData::$identityId); // TODO: identity must have a merchant account on DUMMY_V1 processor // TODO: if we're calling the api with wrong credentials, we get 500 instead of 403 $card = json_decode(self::PAYMENT_CARD_PAYLOAD, true); $card['identity'] = self::$identity->id; $card = new PaymentInstrument($card); $card->save(); self::$card = $card; }
/** * Initializes resources (i.e. registers them with Resource::_registry). Note * that if you add a Resource then you must initialize it here. * * @internal */ private static function initializeResources() { if (self::$initialized) { return; } Resource::init(); Resources\Application::init(); Resources\Identity::init(); Resources\Processor::init(); Resources\Merchant::init(); Resources\PaymentInstrument::init(); Resources\Authorization::init(); Resources\Transfer::init(); Resources\Reversal::init(); Resources\Dispute::init(); Resources\Webhook::init(); Resources\Settlement::init(); Resources\Verification::init(); Resources\Evidence::init(); self::$initialized = true; }
/** * @param \Finix\Resources\Identity $identity * @return \Finix\Resources\Merchant */ private function createMerchant($identity) { $payload = array("processor" => "DUMMY_V1"); return $identity->provisionMerchantOn($payload); }
public static function setUpBeforeClass() { // TODO: fetch this from the API via collection self::$identity = Identity::retrieve(SampleData::$identityId); }