36 lines
684 B
PHP
36 lines
684 B
PHP
<?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\PaymentGatewayInterface;
|
|
|
|
class AlipayAdapter implements PaymentGatewayInterface
|
|
{
|
|
/**
|
|
* @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);
|
|
}
|
|
} |