- Integration type:
- Payment method:
- see namespace
Oro\Bundle\ApruveBundle\Method\PaymentActionfor concrete payment method actions implementations
- Apruve-specific models and builders for them:
- see namespaces
- see namespaces
- Apruve Rest client:
Oro\Bundle\ApruveBundle\Client\ApruveRestClient- works with
RestClientFactoryInterfaceunder the hood
Oro\Bundle\ApruveBundle\Client\Request\ApruveRequest- requests DTO
- Apruve webhooks:
Oro\Bundle\ApruveBundle\Controller\WebhookController- entry point of webhooks processing
Oro\Bundle\ApruveBundle\EventListener\Callback\PaymentCallbackListener- handles “return” payment event, which is triggered when a user authorizes a payment. Delegates further processing to
- PaymentTransaction 1 is created in
Oro\Bundle\ApruveBundle\Method\PaymentAction\PurchasePaymentActionwhen a customer clicks Submit at the last step of the checkout process.
- If a customer authorizes payment in the Apruve lightbox, PaymentTransaction 1 is updated with Apruve Order Id and is marked as successful in
Oro\Bundle\ApruveBundle\Method\PaymentAction\AuthorizePaymentAction. Otherwise, nothing is changed.
- Once payment is authorized, it can be invoiced using the “Send Invoice” button in the admin area on the Order view page in the “Payment History” section. When you click “Send Invoice”, PaymentTransaction 2 is created along with Apruve Invoice in
Oro\Bundle\ApruveBundle\Method\PaymentAction\InvoicePaymentAction. As soon as the Apruve Invoice is created successfully, PaymentTransaction 3 is created along with the Apruve Shipment entity in
- When a customer fulfills an invoice, Apruve notifies about it via webhook invoice.closed, which is processed starting from in
Oro\Bundle\ApruveBundle\Controller\WebhookController. In case of success, PaymentTransaction 4 is created and marked as successful. If a customer does not pay for the Apruve Invoice in time, it is marked as overdue and silently canceled on the Apruve side.
Things to Consider:
- Apruve does not properly respect the price_total_cents property of Apruve LineItem. It is not taken into account when a secure hash is generated from Apruve Order on the Apruve side, although Apruve takes amount_cents. That is why, amount_cents property is used in the Apruve LineItem entity. See
Oro\Bundle\ApruveBundle\Apruve\Generator\OrderSecureHashGeneratorfor details. On the other hand, price_total_cents is required for the line items which reside in the Apruve Invoice, therefore, both of these properties are present in the Apruve LineItem entity.
- Apruve wants to be notified about shipments from merchants who sell physical goods but does not need this for other merchant types. Therefore, it does not fulfill invoices when it is not notified of shipment (when the Shipment entity is not created via API) for physical goods merchants. To unify the behavior of all merchant types, Apruve is always notified about shipment regardless of the type of the goods sold. Shipment entity is created in Apruve and Invoice entity when the “Send Invoice” button is clicked on the Order view page in the “Payment History” section.
Is the customer forwarded to the Apruve-hosted payment page during checkout?
No, customers do not leave the commerce application during the checkout process. The user has to authorize payment in the Apruve popup (lightbox) at the last step of the checkout.
How can I log in/register in the Apruve sandbox?
You have to ask Apruve Support (
firstname.lastname@example.org) for a test merchant and buyer account.
I have a corporate Apruve account, but it is not accepted during the checkout process.
Corporate accounts differ. You should have a corporate account associated precisely with the merchant account you are dealing with.