You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
544 B
25 lines
544 B
<?php
|
|
namespace app\common\payment;
|
|
|
|
use app\common\payment\PaymentFactory;
|
|
|
|
class Payment
|
|
{
|
|
private $paymentGateway;
|
|
|
|
public function __construct($pay_code){
|
|
$this->paymentGateway = PaymentFactory::createPaymentService($pay_code);
|
|
}
|
|
|
|
public function pay($order){
|
|
return $this->paymentGateway->pay($order);
|
|
}
|
|
|
|
public function response($data){
|
|
return $this->paymentGateway->response($data);
|
|
}
|
|
|
|
public function callback($data){
|
|
return $this->paymentGateway->callback($data);
|
|
}
|
|
} |