@@ -139,6 +139,6 @@ |
||
| 139 | 139 | if ($owner->getIsNewRecord()) { |
| 140 | 140 | throw new InvalidCallException('Updating the timestamp is not possible on a new record.'); |
| 141 | 141 | } |
| 142 | - $owner->updateAttributes(array_fill_keys((array) $attribute, $this->getValue(null))); |
|
| 142 | + $owner->updateAttributes(array_fill_keys((array)$attribute, $this->getValue(null))); |
|
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | 145 | \ No newline at end of file |
@@ -60,11 +60,11 @@ discard block |
||
| 60 | 60 | * @var array 交易类型和Trade映射 |
| 61 | 61 | */ |
| 62 | 62 | public $tradeTypeMap = [ |
| 63 | - Trade::TYPE_NATIVE => 'alipay.trade.page.pay',//WEB 原生扫码支付 |
|
| 64 | - Trade::TYPE_JS_API => 'alipay.trade.create',//应用内JS API,如微信 |
|
| 65 | - Trade::TYPE_APP => 'alipay.trade.app.pay',//app支付 |
|
| 66 | - Trade::TYPE_H5 => 'alipay.trade.wap.pay',//H5支付 |
|
| 67 | - Trade::TYPE_MICROPAY => 'alipay.trade.precreate',//刷卡支付 |
|
| 63 | + Trade::TYPE_NATIVE => 'alipay.trade.page.pay', //WEB 原生扫码支付 |
|
| 64 | + Trade::TYPE_JS_API => 'alipay.trade.create', //应用内JS API,如微信 |
|
| 65 | + Trade::TYPE_APP => 'alipay.trade.app.pay', //app支付 |
|
| 66 | + Trade::TYPE_H5 => 'alipay.trade.wap.pay', //H5支付 |
|
| 67 | + Trade::TYPE_MICROPAY => 'alipay.trade.precreate', //刷卡支付 |
|
| 68 | 68 | ]; |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | protected function initApp() |
| 85 | 85 | { |
| 86 | 86 | if (empty ($this->appId) && !isset($this->payment->params['alipay.appId'])) { |
| 87 | - throw new InvalidConfigException ('The "appId" property must be set.'); |
|
| 87 | + throw new InvalidConfigException('The "appId" property must be set.'); |
|
| 88 | 88 | } |
| 89 | 89 | if (empty ($this->appId)) { |
| 90 | 90 | $this->appId = $this->payment->params['alipay.appId']; |
@@ -95,10 +95,10 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | if (empty ($this->privateKey)) { |
| 98 | - throw new InvalidConfigException ('The "privateKey" property must be set.'); |
|
| 98 | + throw new InvalidConfigException('The "privateKey" property must be set.'); |
|
| 99 | 99 | } |
| 100 | 100 | if (empty ($this->publicKey)) { |
| 101 | - throw new InvalidConfigException ('The "publicKey" property must be set.'); |
|
| 101 | + throw new InvalidConfigException('The "publicKey" property must be set.'); |
|
| 102 | 102 | } |
| 103 | 103 | $privateKey = "file://" . Yii::getAlias($this->privateKey); |
| 104 | 104 | $this->privateKey = openssl_pkey_get_private($privateKey); |