我在我的网站上使用贝宝标准代码,但在成功付款后,我在成功页面上没有任何信息。
以及如何从贝宝页面获取交易 ID、金额和其他详细信息。
我的代码是这样的:
payment.php 页面
<?php
$paypal_url='https://www.sandbox.paypal.com/cgi-bin/webscr'; // Test Paypal API URL
$paypal_id='ankur.garg@trignodev.com'; // Business email ID
?>
<form action="<?php echo $paypal_url; ?>" method="post">
<input type='hidden' name='business' value='<?php echo $paypal_id; ?>'>
<input type='hidden' name='cmd' value='_xclick'>
<input type='hidden' name='item_name' value='<?php echo $product_name;?>'>
<input type='hidden' name='amount' value='<?php echo $product_price;?>'>
<input type='hidden' name='no_shipping' value='1'>
<input type='hidden' name='currency_code' value='USD'>
<input type='hidden' name='cancel_return' value='<?php echo $base;?>'>
<input type='hidden' name='return' value='<?php echo $base;?>index.php?route=product/creditsuccess'>
<input type="submit" value="Buy Now">
</form>
和成功.php
<?php
$item_transaction = $_REQUEST['tx'];
$item_price = $_POST['amount']; // Paypal received amount
echo "your payment is successfully";
echo "and here is the detail:";
echo $item_transaction;
echo $item_price;
?>
请帮我在成功页面上获取交易 ID、金额和 payment_status。