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