0

我已经使用Codeigniter开发了一个网站,我想将贝宝用于我的一个应用程序。为此,我遵循了许多类似这样的表格,但是当我遵循所有步骤时,它给了我空白屏幕......谁能告诉我甚至建议我为 Paypal 提供更好的教程..提前谢谢..

4

1 回答 1

2
use following paypal form pattern for paypal payment

//$urlpaypal = "https://www.paypal.com/cgi-bin/webscr";
//$urlpaypal = "https://www.sandbox.paypal.com/cgi-bin/webscr";//sandbox

<form method="post" name="frmPayPal" id="frmPayPal" action="<?=$urlpaypal ?>">

<input type="hidden" name="item_number" value="<?=$id?>"> 
<input type="hidden" name="rm" value="2"> 
<input type="hidden" name="business" value="<?=$businessId?>"> 
<input type="hidden" name="redirect_cmd" value="_cart"> 
<input type="hidden" name="handling_cart" value="<?=$shipprice?>">
<input type="hidden" name="cmd" value="_ext-enter" /> 
<input type='hidden' name='upload' value='1'> 
<input type="hidden" name="no_note" value="1"> 
<input type="hidden" name="lc"  value="<?php echo $lccode;?>"> 
<input type="hidden" name="bn"  value="PP-SubscriptionsBF"> 
<input type="hidden" name="image_url" value="<?=base_url()?>img/logo.jpg"> 
<input type="hidden" name="return" value="<?=base_url()?>index.php/payment/receipt/<?php echo $id;?>">
<input type="hidden" name="notify_url" value="<?=base_url()?>index.php/payment/notify"> 
<input type="hidden" name="cancel_return" value="<?=base_url()?>index.php/payment/cancle"> 
<input type="hidden" name="invoice" value="<?=base64_encode($invoiceId)?>"> 
<input type="hidden" name="currency_code" value="<?php echo $currencycode;?>">
<input type="hidden" name="src" value="1" />
<input type="hidden" name="sra" value="1" /> 
<input type="hidden" name="cs" value="0" /> 
<input type="hidden" name="custom" value="<?=$customFieldValue?>"> 
<input type="hidden" name="discount_amount_cart" value="<?=$discount_amount?>"> 
<input type="hidden" name="cc_number" value="123"> 
<input type="hidden" name="cpp_ headerback_ color" value="78f3f5"> 
<input type="hidden" name="cpp_ headerborder_color" value="78f3f5"> 
<input type="hidden" name="cpp_payflow_ color" value="78f3f5">
</form>

and js code for auto form submission in one second
<script type="text/javascript" language="javascript">
setTimeout("document.forms['frmPayPal'].submit()", 1000);
</script>
于 2013-08-05T10:34:50.993 回答