$data = [
"key" => $api_key,
"amount" => $amount,
"name" => "DJ Tiesto",
"description" => "Tron Legacy",
"image" => "logo.png",
"prefill" => [
"name" => "Daft Punk",
"email" => "customer@merchant.com",
"contact" => "9999999999",
],
"notes" => [
"address" => "Hello World",
"merchant_order_id" => "12312321",
],
"theme" => [
"color" => "#F37254"
],
"order_id" => $razorpayOrderId,
];
我试图将razorpay与php集成,一切正常,但在预填充中,我得到一个默认值.如何将此值更改为自定义值?
最佳答案 在预填充中,您将获得预填充对象中给出的值.就像你传递$amount和$razorpayOrderId一样,你可以使用$name和$email等,这可能是你从文本框或类似的东西获得的价值.将这些名称和电子邮件存储在变量中并将其传递到预填充中.