This Omnipay-based bundle provides basic payment logic for Symfony applications.
- creating payment
- approving payment before purchase
- standard purchase and purchase with pre-authorise
- refund or canceling payment
- the sending notify emails of every changed payment state
- logging every actions in log and Event entity
- provides the interface for the adding receipt to payment
To manage payment state used Symfony Workflow Component.
Scheme of payment state changes:
composer require darvinstudio/darvin-payment-bundle
/** @var $paymentFactory \Darvin\PaymentBundle\Payment\Factory\PaymentFactoryInterface */
$payment = $paymentFactory->createPayment(
new PaidOrder(
(string)$order->getId(),
get_class($order),
(string)$order->getNumber()
),
$order->getPrice(),
new Client(
(string)$user->getId(),
get_class($user),
$user->getEmail()
),
'USD'
);
{{ payment_purchase_urls(payment) }}
{{ payment_purchase_widget(order) }}