add some doc in module payment interface
This commit is contained in:
@@ -27,14 +27,18 @@ use Thelia\Model\Order;
|
|||||||
|
|
||||||
interface PaymentModuleInterface extends BaseModuleInterface
|
interface PaymentModuleInterface extends BaseModuleInterface
|
||||||
{
|
{
|
||||||
const NOT_PAID = 1;
|
|
||||||
const PAID = 2;
|
|
||||||
const PROCESSING = 3;
|
|
||||||
const SENT = 4;
|
|
||||||
const CANCELED = 5;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
*
|
||||||
|
* Method used by payment gateway.
|
||||||
|
*
|
||||||
|
* If this method return a \Thelia\Core\HttpFoundation\Response instance, this response is send to the
|
||||||
|
* browser.
|
||||||
|
*
|
||||||
|
* In many cases, it's necessary to send a form to the payment gateway. On your response you can return this form already
|
||||||
|
* completed, ready to be sent
|
||||||
|
*
|
||||||
|
* @param \Thelia\Model\Order $order processed order
|
||||||
|
* @return null|\Thelia\Core\HttpFoundation\Response
|
||||||
*/
|
*/
|
||||||
public function pay(Order $order);
|
public function pay(Order $order);
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ use Thelia\Core\Template\ParserInterface;
|
|||||||
use Thelia\Mailer\MailerFactory;
|
use Thelia\Mailer\MailerFactory;
|
||||||
use Thelia\Model\ConfigQuery;
|
use Thelia\Model\ConfigQuery;
|
||||||
use Thelia\Model\MessageQuery;
|
use Thelia\Model\MessageQuery;
|
||||||
|
use Thelia\Model\OrderStatus;
|
||||||
use Thelia\Module\PaymentModuleInterface;
|
use Thelia\Module\PaymentModuleInterface;
|
||||||
|
|
||||||
|
|
||||||
@@ -57,7 +58,7 @@ class SendMail implements EventSubscriberInterface
|
|||||||
$order = $event->getOrder();
|
$order = $event->getOrder();
|
||||||
$colissimo = new Colissimo();
|
$colissimo = new Colissimo();
|
||||||
|
|
||||||
if ($order->getStatusId() == PaymentModuleInterface::SENT && $order->getDeliveryModuleId() == $colissimo->getModuleModel()->getId()) {
|
if ($order->getStatusId() == OrderStatus::CODE_SENT && $order->getDeliveryModuleId() == $colissimo->getModuleModel()->getId()) {
|
||||||
$contact_email = ConfigQuery::read('store_email');
|
$contact_email = ConfigQuery::read('store_email');
|
||||||
|
|
||||||
if ($contact_email) {
|
if ($contact_email) {
|
||||||
|
|||||||
Reference in New Issue
Block a user