feat : pay Adapter
Some checks are pending
Build Docker / build (push) Waiting to run

This commit is contained in:
2025-09-04 23:08:54 +08:00
parent 595d3d3276
commit f4b812f861
25 changed files with 694 additions and 1 deletions

View File

@@ -0,0 +1,36 @@
<?php
/**
* This service file is part of item.
*
* @author ctexthuang
* @contact ctexthuang@qq.com
* @web_site https://ctexthuang.com
*/
declare(strict_types=1);
namespace App\Service\Test\Adapter\Pay;
use App\Interface\Test\Adapter\PaymentGateway;
class AlipayAdapter implements PaymentGateway
{
/**
* @var AlipayService
*/
private AlipayService $alipay;
public function __construct(AlipayService $alipay)
{
$this->alipay = $alipay;
}
/**
* @param float $amount
* @return array
*/
public function pay(float $amount): array
{
return $this->alipay->sendPayment($amount);
}
}