소스 검색

[Boutique] Ajustement paiement commande via Stripe

feature/souke
Guillaume Bourgeois 11 달 전
부모
커밋
40c3b3fe25
1개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  1. +2
    -6
      producer/controllers/CreditController.php

+ 2
- 6
producer/controllers/CreditController.php 파일 보기

@@ -226,7 +226,6 @@ class CreditController extends ProducerBaseController
// Handle the event
switch ($event->type) {
case 'charge.succeeded':

$paymentExist = Payment::searchOne([
'id_user' => $idUser,
'amount' => $amount,
@@ -238,13 +237,9 @@ class CreditController extends ProducerBaseController

if (!$paymentExist) {

$paymentManager->creditUser($user, $amount, MeanPayment::CREDIT_CARD, $user);

if (isset($order) && $order) {

$paymentManager->payOrder($order, MeanPayment::CREDIT_CARD, $user, true);


// client : envoi d'un email de confirmation de paiement
/*\Yii::$app->mailerService->sendFromProducer(
'Confirmation de commande',
@@ -272,8 +267,9 @@ class CreditController extends ProducerBaseController
$contactProducer->email
);
} else {
$userProducer = $this->getUserProducerModule()->findOneUserProducer($user);
$paymentManager->creditUser($user, $amount, MeanPayment::CREDIT_CARD, $user);

$userProducer = $this->getUserProducerModule()->findOneUserProducer($user);
\Yii::$app->mailerService->sendFromProducer(
'Alimentation de votre crédit',
'creditConfirm',

Loading…
취소
저장