public function disputedTransferCreateFromPaymentCard() { $transfer_state = $this->fillSourceTransfer($this->transfer); $transfer = new Transfer($transfer_state); $transfer->save(); $this->assertStringStartsWith('TR', $transfer->id); $this->assertEquals($transfer->state, 'PENDING'); // transfers are async }
private function createDestinationTransfer($identity, $bank) { $state = ["processor" => "DUMMY_V1", "amount" => 1000, "currency" => "USD", "merchant_identity" => $identity->id, "destination" => $bank->id]; $destTxfr = new Transfer($state); return $destTxfr->save(); }
public function test_reversalCreate() { $transfer_state = $this->fillSourceTransfer($this->transfer); $transfer = new Transfer($transfer_state); $transfer->save(); $reversal = $transfer->reverse(100); // reversals are transfers in opp. direction, so are also async $this->assertEquals($reversal->state, 'PENDING'); $this->assertStringEndsWith($transfer->id, $reversal->getParentTransferHref()); }