$api_key, "amount" => $amount, "-6ren">
gpt4 book ai didi

php - 预填充在 razorpay 中不起作用

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:43:20 25 4
gpt4 key购买 nike

$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 集成,一切正常,但在预填充中,我得到了一个默认值。如何将此值更改为自定义值?

最佳答案

在 prefill 中,您将获得在 prefill 对象中给定的值。就像您传递 $amount 和 $razorpayOrderId 一样,您可以使用 $name 和 $email 等,这可能是您从文本框或类似内容中获得的值。将这些名称和电子邮件存储在一个变量中,并将其传递给预填充。

关于php - 预填充在 razorpay 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51130048/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com