没有使用paypal付款方式的信用卡选项

时间:2011-10-15 16:54:17

标签: php paypal web commerce

我正在尝试将paypal整合到购物结帐中。我创建了一个定制购物车的网站。现在我在看了http://www.youtube.com/watch?v=qDbTqeSUrQY&feature=relmfu

后添加了paypal集成代码

它有效,但唯一的问题是,当我用沙箱尝试,或从买家的角度来看真实账户我不能使用信用卡,即我需要paypal帐户来执行。我不知道是否需要更改代码或更改paypal中的设置。我试着通过他们的文件没有提到,它说我可以接受快递和标准账户中的信用卡付款,但是如何?

我使用的代码

<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="upload" value="1">
<input type="hidden" name="business" value="abhishek.salian.85@gmail.com">
<?php if($_SESSION['cart']) { $total = 0;$i=0;
foreach($_SESSION['cart'] as $product_id => $quantity) {
$product_details = get_product_details($product_id);
$row_cost = $product_details[product_price] * $quantity;
$total = $total + $row_cost; $x=$i+1; ?>
<input type="hidden" name="item_name_<?php echo $x; ?>" value="<?php echo $product_details[product_title]; ?>">
<input type="hidden" name="quantity_<?php echo $x; ?>" value="<?php echo $_SESSION['cart'][product_id]; ?>">
<input type="hidden" name="amount_<?php echo $x; ?>" value="<?php echo $product_details[product_price]; ?>">
<?php $product_id_array = $product_details[product_id]."-".$_SESSION['cart'][product_id].",";$i++; } } ?>
<input type="hidden" name="custom" value="<?php echo $product_id_array; ?>">
<input type="hidden" name="notify_url" value="<?php echo WEBSITE.'paypal/ipn.php'; ?>">
<input type="hidden" name="return" value="<?php echo WEBSITE.'products/thank_you'; ?>">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="cbt" value="Retun to Flash Shop">
<input type="hidden" name="cancel_return" value="<?php echo WEBSITE.'products/cancel'; ?>">
<input type="hidden" name="lc" value="AU">
<input type="hidden" name="currency_code" value="AUD">
<input type="image" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"></form>

1 个答案:

答案 0 :(得分:0)

我认为这是卖家帐户中的一个设置 - 不是您通过表单传递的内容。

在“个人资料”下,为“网站付款首选项”链接提供资金,然后查找“PayPal帐户可选”部分。选择“开”并保存设置。

相关问题