feat : Bridge pay
This commit is contained in:
@@ -11,11 +11,16 @@ declare(strict_types=1);
|
||||
*/
|
||||
|
||||
use App\Interface\Test\Adapter\CacheInterface;
|
||||
use App\Interface\Test\Bridge\PaymentInterface;
|
||||
use App\Interface\Test\Decorator\HttpClientInterface;
|
||||
use App\Interface\Test\Decorator\LoggerInterface;
|
||||
use App\Interface\Test\Proxy\UserInfoInterface;
|
||||
use App\Lib\Request\GuzzleHttpClient;
|
||||
use App\Service\Test\Adapter\Cache\RedisCacheService;
|
||||
use App\Service\Test\Bridge\Pay\Lib\AlipayPayment;
|
||||
use App\Service\Test\Bridge\Pay\Lib\CreditCardPayment;
|
||||
use App\Service\Test\Bridge\Pay\PremiumPaymentService;
|
||||
use App\Service\Test\Bridge\Pay\StandardPaymentService;
|
||||
use App\Service\Test\Decorator\Container\BasicFileLogger;
|
||||
use App\Service\Test\Decorator\Container\CriticalLoggerDecorator;
|
||||
use App\Service\Test\Decorator\Container\IpLoggerDecorator;
|
||||
@@ -47,5 +52,17 @@ return [
|
||||
$logger = make(BasicFileLogger::class);
|
||||
$cache = make(Cache::class);
|
||||
return make(CacheUserInfoService::class, ['userInfoService' => $service,'logger' => $logger , 'cache' => $cache]);
|
||||
},
|
||||
// PaymentInterface::class => AlipayPayment::class,
|
||||
PaymentInterface::class => CreditCardPayment::class,
|
||||
'standard_payment' => function () {
|
||||
$paymentInterface = make(PaymentInterface::class);
|
||||
$logger = make(BasicFileLogger::class);
|
||||
return new StandardPaymentService($paymentInterface,$logger);
|
||||
},
|
||||
'premium_payment' => function () {
|
||||
$paymentInterface = make(PaymentInterface::class);
|
||||
$logger = make(BasicFileLogger::class);
|
||||
return new PremiumPaymentService($paymentInterface,$logger);
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user