<?php
namespace Payment\Common\Ali\Data\Charge; class QrChargeData extends ChargeBaseData { protected function getBizContent() { $content = [ 'out_trade_no' => strval($this->order_no), 'total_amount' => strval($this->amount), 'subject' => strval($this->subject), 'body' => strval($this->body), 'operator_id' => $this->operator_id, 'store_id' => $this->store_id, 'terminal_id' => $this->terminal_id, ]; $timeExpire = $this->timeout_express; if (! empty($timeExpire)) { $express = floor(($timeExpire - strtotime($this->timestamp)) / 60); ($express > 0) && $content['timeout_express'] = $express . 'm'; } return $content; } } 