dbmsv4 init...3
This commit is contained in:
parent
0db26edf8b
commit
d004bbb1e5
@ -424,6 +424,7 @@ define(
|
|||||||
"하나은행" => "하나은행",
|
"하나은행" => "하나은행",
|
||||||
"신한은행" => "신한은행",
|
"신한은행" => "신한은행",
|
||||||
"농협" => "농협",
|
"농협" => "농협",
|
||||||
|
"결제차감" => "결제차감",
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
//서비스 관련
|
//서비스 관련
|
||||||
|
|||||||
@ -11,4 +11,8 @@ abstract class WalletEntity extends CustomerEntity
|
|||||||
{
|
{
|
||||||
parent::__construct($data);
|
parent::__construct($data);
|
||||||
}
|
}
|
||||||
|
final public function getBalance(): int
|
||||||
|
{
|
||||||
|
return $this->attributes['balance'] ?? 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -126,7 +126,7 @@ class ClientHelper extends CustomerHelper
|
|||||||
$label,
|
$label,
|
||||||
$action,
|
$action,
|
||||||
[
|
[
|
||||||
"data-src" => "/admin/customer/{$action}?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionTemplate=popup",
|
"data-src" => "/admin/customer/wallet/{$action}?clientinfo_uid={$viewDatas['entity']->getPK()}&ActionTemplate=popup",
|
||||||
"data-bs-toggle" => "modal",
|
"data-bs-toggle" => "modal",
|
||||||
"data-bs-target" => "#modal_action_form",
|
"data-bs-target" => "#modal_action_form",
|
||||||
"class" => "text-primary",
|
"class" => "text-primary",
|
||||||
|
|||||||
@ -15,7 +15,7 @@ return [
|
|||||||
'created_at' => "작성일",
|
'created_at' => "작성일",
|
||||||
'deleted_at' => "삭제일",
|
'deleted_at' => "삭제일",
|
||||||
],
|
],
|
||||||
"BANK" => [...BANKS, '결제차감' => '결제차감'],
|
"BANK" => BANKS,
|
||||||
"STATUS" => [
|
"STATUS" => [
|
||||||
STATUS['DEPOSIT'] => "입금",
|
STATUS['DEPOSIT'] => "입금",
|
||||||
STATUS['WITHDRAWAL'] => "출금",
|
STATUS['WITHDRAWAL'] => "출금",
|
||||||
|
|||||||
@ -110,56 +110,6 @@ class ClientService extends CustomerService
|
|||||||
$this->getFormService()->setIndexFilters($indexFilter);
|
$this->getFormService()->setIndexFilters($indexFilter);
|
||||||
$this->getFormService()->setBatchjobFilters($batchjobFilters);
|
$this->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||||
}
|
}
|
||||||
final public function updateBalance(int|ClientEntity $uid, string $title, string $key, int $value, string $status): ClientEntity
|
|
||||||
{
|
|
||||||
$entity = is_int($uid) ? $this->getEntity($uid) : $uid;
|
|
||||||
if (!$entity instanceof ClientEntity) {
|
|
||||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 서비스정보를 찾을수 없습니다.");
|
|
||||||
}
|
|
||||||
|
|
||||||
$calculatedValue = null;
|
|
||||||
$balance = 0;
|
|
||||||
$field = "";
|
|
||||||
switch ($key) {
|
|
||||||
case PAYMENT['PAY']['ACCOUNT']:
|
|
||||||
$balance = $entity->getAccountBalance();
|
|
||||||
$field = "account_balance";
|
|
||||||
break;
|
|
||||||
case PAYMENT['PAY']['COUPON']:
|
|
||||||
$balance = $entity->getCouponBalance();
|
|
||||||
$field = "coupon_balance";
|
|
||||||
break;
|
|
||||||
case PAYMENT['PAY']['POINT']:
|
|
||||||
$balance = $entity->getPointBalance();
|
|
||||||
$field = "point_balance";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
//입금,추가 처리
|
|
||||||
if ($status === STATUS['DEPOSIT']) {
|
|
||||||
$calculatedValue = $balance + $value;
|
|
||||||
}
|
|
||||||
//출금,사용 처리
|
|
||||||
if ($status === STATUS['WITHDRAWAL']) {
|
|
||||||
if ($balance < $value) {
|
|
||||||
throw new RuntimeException(sprintf(
|
|
||||||
"%s 에서 오류발생: %s 고객의 %s[ %s ]이/가 사용한 %s 금액/수[ %s ]이/가 부족합니다.",
|
|
||||||
static::class . '->' . __FUNCTION__,
|
|
||||||
$entity->getTitle(),
|
|
||||||
$title,
|
|
||||||
number_format($balance),
|
|
||||||
$title,
|
|
||||||
number_format($value)
|
|
||||||
));
|
|
||||||
}
|
|
||||||
$calculatedValue = $balance - $value;
|
|
||||||
}
|
|
||||||
if (!is_int($calculatedValue) || $calculatedValue < 0) {
|
|
||||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$entity->getTitle()} 고객 {$title}의 계산결과 값이 NULL이거나 0보다 작은 값입니다.");
|
|
||||||
}
|
|
||||||
//balance 수정
|
|
||||||
$formDatas = [$field => $calculatedValue];
|
|
||||||
return parent::modify_process($entity, $formDatas);
|
|
||||||
}
|
|
||||||
//기본 기능부분
|
//기본 기능부분
|
||||||
protected function getEntity_process(mixed $entity): ClientEntity
|
protected function getEntity_process(mixed $entity): ClientEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@ -13,6 +13,7 @@ use RuntimeException;
|
|||||||
|
|
||||||
class AccountService extends WalletService
|
class AccountService extends WalletService
|
||||||
{
|
{
|
||||||
|
const CLIENTINFO_BALANCE_FIELD = 'account_balance';
|
||||||
private $_form = null;
|
private $_form = null;
|
||||||
private $_helper = null;
|
private $_helper = null;
|
||||||
public function __construct(AccountModel $model)
|
public function __construct(AccountModel $model)
|
||||||
@ -133,49 +134,25 @@ class AccountService extends WalletService
|
|||||||
$this->model->orLike($this->model->getTable() . '.alias', $word, 'both');
|
$this->model->orLike($this->model->getTable() . '.alias', $word, 'both');
|
||||||
parent::setSearchWord($word);
|
parent::setSearchWord($word);
|
||||||
}
|
}
|
||||||
//결제처리 관련
|
//결제 관련 출금 처리
|
||||||
protected function createByPayment_process(PaymentEntity $paymentEntity, array $formDatas = []): array
|
protected function withdrawalByPayment_process(ClientEntity $clientEntity, PaymentEntity $paymentEntity, array $formDatas): array
|
||||||
{
|
{
|
||||||
$formDatas['bank'] = $formDatas['alias'] = '결제차감';
|
$amount = $paymentEntity->getAmount();
|
||||||
$formDatas['amount'] = $paymentEntity->getAmount();
|
$balance = $clientEntity->getAccountBalance();
|
||||||
return parent::createByPayment_process($paymentEntity, $formDatas);
|
|
||||||
}
|
|
||||||
//입금처리
|
|
||||||
protected function setDeposit_process(ClientEntity $clientEntity, int $amount): int
|
|
||||||
{
|
|
||||||
$calculatedBalance = $balance = $clientEntity->getAccountBalance();
|
|
||||||
$field = "account_balance";
|
|
||||||
if ($balance < $amount) {
|
if ($balance < $amount) {
|
||||||
throw new RuntimeException(sprintf(
|
throw new RuntimeException(sprintf(
|
||||||
"%s 에서 오류발생: %s 고객의 예치금액(%s원)이 출금액(%s원) 보다 부족합니다.",
|
"%s 에서 오류발생: 출금액(%s원) , %s 고객의 예치금액(%s원)이 부족합니다.",
|
||||||
static::class . '->' . __FUNCTION__,
|
static::class . '->' . __FUNCTION__,
|
||||||
|
number_format($amount),
|
||||||
$clientEntity->getTitle(),
|
$clientEntity->getTitle(),
|
||||||
number_format($balance),
|
number_format($balance)
|
||||||
number_format($amount)
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
//최종처리
|
//최종처리
|
||||||
$calculatedBalance = $balance - $amount;
|
$formDatas['bank'] = BANKS['결제차감'];
|
||||||
service('customer_clientservice')->modify_process($clientEntity, ['account_balance' => $calculatedBalance]);
|
$formDatas['alias'] = array_key_exists('alias', $formDatas) ? $formDatas['alias'] : $clientEntity->getTitle();
|
||||||
return $calculatedBalance;
|
$formDatas['amount'] = $amount;
|
||||||
}
|
$formDatas['balance'] = $balance - $amount;
|
||||||
|
return $formDatas;
|
||||||
//출금처리
|
|
||||||
protected function setWithdrawal_process(ClientEntity $clientEntity, int $amount): int
|
|
||||||
{
|
|
||||||
$calculatedBalance = $balance = $clientEntity->getAccountBalance();
|
|
||||||
if ($balance < $amount) {
|
|
||||||
throw new RuntimeException(sprintf(
|
|
||||||
"%s 에서 오류발생: %s 고객의 예치금액(%s원)이 출금액(%s원) 보다 부족합니다.",
|
|
||||||
static::class . '->' . __FUNCTION__,
|
|
||||||
$clientEntity->getTitle(),
|
|
||||||
number_format($balance),
|
|
||||||
number_format($amount)
|
|
||||||
));
|
|
||||||
}
|
|
||||||
//최종처리
|
|
||||||
$calculatedBalance = $balance - $amount;
|
|
||||||
service('customer_clientservice')->modify_process($clientEntity, ['account_balance' => $calculatedBalance]);
|
|
||||||
return $calculatedBalance;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
namespace App\Services\Customer\Wallet;
|
namespace App\Services\Customer\Wallet;
|
||||||
|
|
||||||
use App\DTOs\Customer\Wallet\CouponDTO;
|
use App\DTOs\Customer\Wallet\CouponDTO;
|
||||||
|
use App\Entities\Customer\ClientEntity;
|
||||||
use App\Entities\Customer\Wallet\CouponEntity;
|
use App\Entities\Customer\Wallet\CouponEntity;
|
||||||
use App\Entities\PaymentEntity;
|
use App\Entities\PaymentEntity;
|
||||||
use App\Forms\Customer\Wallet\CouponForm;
|
use App\Forms\Customer\Wallet\CouponForm;
|
||||||
@ -120,10 +121,23 @@ class CouponService extends WalletService
|
|||||||
//FormFilter 조건절 처리
|
//FormFilter 조건절 처리
|
||||||
//검색어조건절처리
|
//검색어조건절처리
|
||||||
|
|
||||||
//결제처리 관련
|
//결제 관련 쿠폰 사용 처리
|
||||||
protected function createByPayment_process(PaymentEntity $paymentEntity, array $formDatas = []): array
|
protected function withdrawalByPayment_process(ClientEntity $clientEntity, PaymentEntity $paymentEntity, array $formDatas): array
|
||||||
{
|
{
|
||||||
$formDatas['cnt'] = $paymentEntity->getAmount();
|
$amount = $paymentEntity->getAmount();
|
||||||
return parent::createByPayment_process($paymentEntity, $formDatas);
|
$balance = $clientEntity->getCouponBalance();
|
||||||
|
if ($balance < $amount) {
|
||||||
|
throw new RuntimeException(sprintf(
|
||||||
|
"%s 에서 오류발생: 사용쿠폰 수량(%s) , %s 고객의 잔여쿠폰 수량(%s)이 부족합니다.",
|
||||||
|
static::class . '->' . __FUNCTION__,
|
||||||
|
number_format($amount),
|
||||||
|
$clientEntity->getTitle(),
|
||||||
|
number_format($balance)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
//최종처리
|
||||||
|
$formDatas['cnt'] = $amount;
|
||||||
|
$formDatas['balance'] = $balance - $amount;
|
||||||
|
return $formDatas;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
namespace App\Services\Customer\Wallet;
|
namespace App\Services\Customer\Wallet;
|
||||||
|
|
||||||
use App\DTOs\Customer\Wallet\PointDTO;
|
use App\DTOs\Customer\Wallet\PointDTO;
|
||||||
|
use App\Entities\Customer\ClientEntity;
|
||||||
use App\Entities\Customer\Wallet\PointEntity;
|
use App\Entities\Customer\Wallet\PointEntity;
|
||||||
use App\Entities\PaymentEntity;
|
use App\Entities\PaymentEntity;
|
||||||
use App\Forms\Customer\Wallet\PointForm;
|
use App\Forms\Customer\Wallet\PointForm;
|
||||||
@ -120,10 +121,23 @@ class PointService extends WalletService
|
|||||||
//FormFilter 조건절 처리
|
//FormFilter 조건절 처리
|
||||||
//검색어조건절처리
|
//검색어조건절처리
|
||||||
|
|
||||||
//결제처리 관련
|
//결제 관련 출금 처리
|
||||||
protected function createByPayment_process(PaymentEntity $paymentEntity, array $formDatas = []): array
|
protected function withdrawalByPayment_process(ClientEntity $clientEntity, PaymentEntity $paymentEntity, array $formDatas): array
|
||||||
{
|
{
|
||||||
$formDatas['amount'] = $paymentEntity->getAmount();
|
$amount = $paymentEntity->getAmount();
|
||||||
return parent::createByPayment_process($paymentEntity, $formDatas);
|
$balance = $clientEntity->getPointBalance();
|
||||||
|
if ($balance < $amount) {
|
||||||
|
throw new RuntimeException(sprintf(
|
||||||
|
"%s 에서 오류발생: 사용포인트(%s) , %s 고객의 포인트(%s)가 부족합니다.",
|
||||||
|
static::class . '->' . __FUNCTION__,
|
||||||
|
number_format($amount),
|
||||||
|
$clientEntity->getTitle(),
|
||||||
|
number_format($balance)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
//최종처리
|
||||||
|
$formDatas['amount'] = $amount;
|
||||||
|
$formDatas['balance'] = $balance - $amount;
|
||||||
|
return $formDatas;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,80 +15,31 @@ abstract class WalletService extends CustomerService
|
|||||||
parent::__construct($model);
|
parent::__construct($model);
|
||||||
$this->addClassPaths('Wallet');
|
$this->addClassPaths('Wallet');
|
||||||
}
|
}
|
||||||
abstract protected function setWithdrawal_process(ClientEntity $clientEntity, int $amount): int;
|
abstract protected function withdrawalByPayment_process(ClientEntity $clientEntity, PaymentEntity $paymentEntity, array $formDatas): array;
|
||||||
private function setDeposit(int|ClientEntity $uid, string $title, string $key, int $value, string $status): ClientEntity
|
|
||||||
{
|
|
||||||
$entity = is_int($uid) ? $this->getEntity($uid) : $uid;
|
|
||||||
if (!$entity instanceof ClientEntity) {
|
|
||||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 서비스정보를 찾을수 없습니다.");
|
|
||||||
}
|
|
||||||
|
|
||||||
$calculatedValue = null;
|
|
||||||
$balance = 0;
|
|
||||||
$field = "";
|
|
||||||
switch ($key) {
|
|
||||||
case PAYMENT['PAY']['ACCOUNT']:
|
|
||||||
$balance = $entity->getAccountBalance();
|
|
||||||
$field = "account_balance";
|
|
||||||
break;
|
|
||||||
case PAYMENT['PAY']['COUPON']:
|
|
||||||
$balance = $entity->getCouponBalance();
|
|
||||||
$field = "coupon_balance";
|
|
||||||
break;
|
|
||||||
case PAYMENT['PAY']['POINT']:
|
|
||||||
$balance = $entity->getPointBalance();
|
|
||||||
$field = "point_balance";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
//입금,추가 처리
|
|
||||||
if ($status === STATUS['DEPOSIT']) {
|
|
||||||
$calculatedValue = $balance + $value;
|
|
||||||
}
|
|
||||||
//출금,사용 처리
|
|
||||||
if ($status === STATUS['WITHDRAWAL']) {
|
|
||||||
if ($balance < $value) {
|
|
||||||
throw new RuntimeException(sprintf(
|
|
||||||
"%s 에서 오류발생: %s 고객의 %s[ %s ]이/가 사용한 %s 금액/수[ %s ]이/가 부족합니다.",
|
|
||||||
static::class . '->' . __FUNCTION__,
|
|
||||||
$entity->getTitle(),
|
|
||||||
$title,
|
|
||||||
number_format($balance),
|
|
||||||
$title,
|
|
||||||
number_format($value)
|
|
||||||
));
|
|
||||||
}
|
|
||||||
$calculatedValue = $balance - $value;
|
|
||||||
}
|
|
||||||
if (!is_int($calculatedValue) || $calculatedValue < 0) {
|
|
||||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 {$entity->getTitle()} 고객 {$title}의 계산결과 값이 NULL이거나 0보다 작은 값입니다.");
|
|
||||||
}
|
|
||||||
//balance 수정
|
|
||||||
$formDatas = [$field => $calculatedValue];
|
|
||||||
return parent::modify_process($entity, $formDatas);
|
|
||||||
}
|
|
||||||
//기본기능
|
//기본기능
|
||||||
|
//결제 관련 출금 처리
|
||||||
//결제처리 관련
|
final public function withdrawalByPayment(PaymentEntity $paymentEntity): void
|
||||||
protected function createByPayment_process(PaymentEntity $paymentEntity, array $formDatas = []): array
|
|
||||||
{
|
{
|
||||||
//고객정보
|
//고객정보
|
||||||
$clientEntity = service('customer_clientservice')->getEntity($paymentEntity->getClientInfoUID());
|
$clientEntity = service('customer_clientservice')->getEntity($paymentEntity->getClientInfoUID());
|
||||||
if (!$clientEntity instanceof ClientEntity) {
|
if (!$clientEntity instanceof ClientEntity) {
|
||||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$paymentEntity->getClientInfoUID()}에 해당하는 고객정보를 찾을수 없습니다.");
|
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$paymentEntity->getClientInfoUID()}에 해당하는 고객정보를 찾을수 없습니다.");
|
||||||
}
|
}
|
||||||
$formDatas['clientinfo_uid'] = $paymentEntity->getClientInfoUID();
|
$formDatas = [];
|
||||||
|
$formDatas['clientinfo_uid'] = $clientEntity->getPK();
|
||||||
$formDatas['title'] = $paymentEntity->getTitle();
|
$formDatas['title'] = $paymentEntity->getTitle();
|
||||||
$formDatas['issue_at'] = date('Y-m-d');
|
$formDatas['issue_at'] = date('Y-m-d');
|
||||||
$formDatas['status'] = STATUS['WITHDRAWAL'];
|
$formDatas['status'] = STATUS['WITHDRAWAL'];
|
||||||
$formDatas['balance'] = $this->setWithdrawal_process($clientEntity, $paymentEntity->getAmount());
|
//출금액 계산
|
||||||
return $formDatas;
|
$formDatas = $this->withdrawalByPayment_process($clientEntity, $paymentEntity, $formDatas);
|
||||||
}
|
|
||||||
final public function createByPayment(PaymentEntity $paymentEntity): void
|
|
||||||
{
|
|
||||||
$formDatas = $this->createByPayment_process($paymentEntity);
|
|
||||||
$fields = array_keys($formDatas);
|
$fields = array_keys($formDatas);
|
||||||
$this->getFormService()->setFormFields($fields);
|
$this->getFormService()->setFormFields($fields);
|
||||||
$this->getFormService()->setFormRules('create', $fields);
|
$this->getFormService()->setFormRules('create', $fields);
|
||||||
$this->create_process($formDatas);
|
$entity = $this->create_process($formDatas);
|
||||||
|
if (!$entity) {
|
||||||
|
throw new RuntimeException(static::class . '->' . __FUNCTION__, "에서 오류발생: {$clientEntity->getTitle()} 고객의 입금(쿠폰추가)처리중 Wallet정보 생성에 실패하였습니다.");
|
||||||
|
}
|
||||||
|
//고객정보 수정
|
||||||
|
service('customer_clientservice')->modify_process($clientEntity, [constant("static::CLIENTINFO_BALANCE_FIELD") => $entity->getBalance()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ use App\Entities\PaymentEntity;
|
|||||||
use App\Forms\PaymentForm;
|
use App\Forms\PaymentForm;
|
||||||
use App\Helpers\PaymentHelper;
|
use App\Helpers\PaymentHelper;
|
||||||
use App\Models\PaymentModel;
|
use App\Models\PaymentModel;
|
||||||
|
use App\Services\Customer\Wallet\WalletService;
|
||||||
use CodeIgniter\Database\Exceptions\DatabaseException;
|
use CodeIgniter\Database\Exceptions\DatabaseException;
|
||||||
use DateTime;
|
use DateTime;
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
@ -209,25 +210,25 @@ class PaymentService extends CommonService
|
|||||||
}
|
}
|
||||||
|
|
||||||
//지불 관련
|
//지불 관련
|
||||||
//pay방식에따른 결제처리
|
//pay방식에따른 WalletService
|
||||||
private function updateWallet(PaymentEntity $entity): void
|
private function getWalletService(string $pay): WalletService
|
||||||
{
|
{
|
||||||
$service = null;
|
$walletService = null;
|
||||||
switch ($entity->getPay()) {
|
switch ($pay) {
|
||||||
case PAYMENT['PAY']['ACCOUNT']:
|
case PAYMENT['PAY']['ACCOUNT']:
|
||||||
$service = service('customer_wallet_accountservice');
|
$walletService = service('customer_wallet_accountservice');
|
||||||
break;
|
break;
|
||||||
case PAYMENT['PAY']['COUPON']:
|
case PAYMENT['PAY']['COUPON']:
|
||||||
$service = service('customer_wallet_couponservice');
|
$walletService = service('customer_wallet_couponservice');
|
||||||
break;
|
break;
|
||||||
case PAYMENT['PAY']['POINT']:
|
case PAYMENT['PAY']['POINT']:
|
||||||
$service = service('customer_wallet_pointservice');
|
$walletService = service('customer_wallet_pointservice');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$entity->getPay()}는 지정되지 않은 지불방식입니다.");
|
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$pay}는 지정되지 않은 지불방식입니다.");
|
||||||
// break;
|
// break;
|
||||||
}
|
}
|
||||||
$service->createByPayment($entity);
|
return $walletService;
|
||||||
}
|
}
|
||||||
//일괄 지불용
|
//일괄 지불용
|
||||||
protected function batchjob_process($entity, array $formDatas): object
|
protected function batchjob_process($entity, array $formDatas): object
|
||||||
@ -235,7 +236,7 @@ class PaymentService extends CommonService
|
|||||||
// modify_process를 호출하여 로직 재사용 (PK 로드 및 PK 제거/방어 로직 포함)
|
// modify_process를 호출하여 로직 재사용 (PK 로드 및 PK 제거/방어 로직 포함)
|
||||||
$entity = parent::batchjob_process($entity, $formDatas);
|
$entity = parent::batchjob_process($entity, $formDatas);
|
||||||
//지불방식에 따른 고객 예치금,쿠폰,포인트 처리
|
//지불방식에 따른 고객 예치금,쿠폰,포인트 처리
|
||||||
$this->updateWallet($entity);
|
$this->getWalletService($entity->getPay())->withdrawalByPayment($entity);
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
//단일 지불용
|
//단일 지불용
|
||||||
@ -252,7 +253,7 @@ class PaymentService extends CommonService
|
|||||||
//결제 완료 처리 후 추가정보 처리
|
//결제 완료 처리 후 추가정보 처리
|
||||||
$entity = parent::modify_process($entity, ['status' => STATUS['PAID']]);
|
$entity = parent::modify_process($entity, ['status' => STATUS['PAID']]);
|
||||||
//지불방식에 따른 고객 예치금,쿠폰,포인트 처리
|
//지불방식에 따른 고객 예치금,쿠폰,포인트 처리
|
||||||
$this->updateWallet($entity);
|
$this->getWalletService($entity->getPay())->withdrawalByPayment($entity);
|
||||||
$db->transComplete();
|
$db->transComplete();
|
||||||
return $entity;
|
return $entity;
|
||||||
} catch (DatabaseException $e) {
|
} catch (DatabaseException $e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user