我使用这个PHP代码:
public function checkout(&$order, &$response)
{
$settings = Settings::get($order->seller_id);
$readon= 'maksājums';
$readon= $order->id;
$order->custom([
'payment_details' => [
'bank_name' => [ 'label' => $this->_->_('Bank Name'), 'value' => $settings->bank_name ],
'account_owner' => [ 'label' => $this->_->_('Account Owner'), 'value' => $settings->account_owner ],
//'bic' => [ 'label' => $this->_->_('BIC/SWIFT'), 'value' => $settings->bic ],
'iban' => ['label' => $this->_->_('IBAN'), 'value' => $settings->iban ],
'reason' => [ 'label' => $this->_->_('Reason for Payment'), 'value' => $readon],
],
]);
$response = [];
$response['redirect'] = $this->meta('manual_url');
return Payment::STATUS_OK;
}
问题是我想在值readon上添加额外的文本。现在$ readon只显示订单号,但我希望它显示的文字如“请为订单编号付款$ order-> id”
答案 0 :(得分:0)
只需将字符串与您需要的内容连接起来即可。像这样,
$readon= "Please make payment for Order No. ".$order->id;