我正在尝试集成用于获取付款详细信息的代码。
billno:此值将从 URL 中获取。
我当前的代码:
include 'razorpay/Razorpay.php';
use Razorpay\Api\Api;
$api = new Api('Secret ID', 'Secret Key');
$payment = $api->payment->fetch($_REQUEST['billno']);
$text = json_encode($payment->toArray());
$obj = json_decode($text);
$shopping_id = $obj->{'notes'}->{'shopping_id'};
$rzp_amount = $obj->{'amount'};//xheck
$real_amount = $rzp_amount/100;
$rzp_key = $obj->{'id'};
$rzp_status = $obj->{'status'}; //Authorised cgecj
$rzp_descp = $obj->{'description'};
$rzp_mail = $obj->{'email'};
$rzp_phone = $obj->{'contact'};
$rzp_address = $obj->{'notes'}->{'address'};
$rzp_timestamp = $obj->{'created_at'};
$rzp_method = $obj->{'method'};
使用代码提取 billno 会给我们上面提到的 $rzp 变量。