Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. foreach ($cardsNotStored as $cardNotStored) {
  2. $this->entityManager->beginTransaction();
  3. try {
  4. $paymentMethod = $this->store($cardNotStored);
  5. $this->entityManager->flush();
  6. $this->entityManager->commit();
  7. } catch (UniqueConstraintViolationException $e) {
  8. $this->entityManager->rollBack();
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement