【发布时间】:2014-08-20 19:44:57
【问题描述】:
听到是我的贝宝支付代码,它重定向到贝宝网关的登录, 但我希望它重定向到直接付款页面,这样如果我没有贝宝帐户 我可以用那个选项来计数。
<?php
$paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
$paypal_id = 'gohilpriyank-facilitator@ymail.com';
?>
<div class="form-group row-fluid">
<div class="span6">
<span style="font-weight: bold">Ship To Address:-</span>
<div><?php echo $ship_to['ship_address']; ?></div>
<div><?php echo $ship_to['ship_landmark']; ?></div>
<div><?php echo $ship_to['ship_city']; ?></div>
<div><?php echo $ship_to['ship_state']; ?></div>
<div><?php echo $ship_to['ship_pincode']; ?></div>
</div>
<div class="span6">
<span style="font-weight: bold">Choose Payment Mode</span>
<form action="<?php echo $paypal_url; ?>" method="post" name="frmPayPal1">
<input type="hidden" name="business" value="<?php echo $paypal_id; ?>">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="item_name" value="Kevalam Payment">
<input type="hidden" name="item_number" value="<?php echo count($this->cart->contents()); ?>">
<input type="hidden" name="credits" value="510">
<input type="hidden" name="userid" value="1">
<input type="hidden" name="amount" value="<?php echo $_SESSION['grand_total']; ?>">
<input type="hidden" name="cpp_header_image" value="http://k1-pc/myriad/assets/user_temp/image/logo.png">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="handling" value="0">
<input type="hidden" name="cancel_return" value="http://k1-pc/myriad/cancel.php">
<input type="hidden" name="return" value="http://k1-pc/myriad/success.php">
<input type="image" src="https://paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" name="submit">
</form>
</div>
</div><div class="clear"></div>
【问题讨论】:
标签: php paypal payment-gateway