public function createCard(CardModel $card, BalancedUserInterface $user) { $card->setBalancedUri(uniqid()); return $card; }
public function chargeSavedCard(CardEntity $cardEntity, Customer $customer, $amount, $statement = null, $description = null) { $card = new Card(); $card->setBalancedUri($cardEntity->getBalancedUri()); return $this->chargeCard($card, $customer, $amount, $statement, $description); }
public function debit(CardModel $card, BalancedUserInterface $user, $amount, $statement = null, $description = null, $meta = null) { if ($this->debug) { $this->logger->info(sprintf("[Balanced Payment] Creating a debit of %d from %d", $amount, $card->getName())); } return $this->balancedPaymentCalls->debit($user->getBalancedUri(), $card->getBalancedUri(), $amount, $statement, $description, $meta); }