| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?php
- namespace addons\YunfastPay\common\services\trans\nocash;
- use addons\YunfastPay\common\services\trans\TransAbstract;
- /**
- * 统一下单
- * UnifiedPayTrans class
- * @package addons\YunfastPay\common\services\trans\nocash
- * @see https://yunfastpay.com/#/interface/tyxd
- */
- class UnifiedPayTrans extends TransAbstract
- {
- /**
- * 微信openid
- *
- * @var string
- */
- protected $buyerCd;
- /**
- * 公众号appid
- *
- * @var string
- */
- protected $appid;
- /**
- * 实例化
- *
- * @param string $outOrderId
- * @param float $transAmt
- * @param string $appid
- * @param string $buyerCd
- * @param string $outOrderTitle
- * @param string $outOrderDesc
- */
- public function __construct(
- string $outOrderId,
- float $transAmt,
- string $appid,
- string $buyerCd,
- string $outOrderTitle,
- string $outOrderDesc = ''
- )
- {
- parent::__construct($outOrderId, $transAmt, $outOrderTitle, $outOrderDesc);
- $this->appid = $appid;
- $this->buyerCd = $buyerCd;
- }
- /**
- * 获取请求参数
- *
- * @return array
- */
- public function getTransData(string $mchtCd) :array
- {
- return [];
- }
- /**
- * 交易码
- *
- * @return string
- */
- public function getTrscode() :string
- {
- return 'TRANS1119';
- }
- /**
- * 产品编号
- *
- * @return string
- */
- public function getProCd() :string
- {
- return 'tran';
- }
- /**
- * 费率通道
- *
- * @return integer
- */
- public function getChanelType() :int
- {
- return 1;
- }
- }
|