【问题标题】:paypal Payment gateway link for direct paymentpaypal 支付网关链接,用于直接支付
【发布时间】: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


    【解决方案1】:

    当使用像这样的付款标准时,客人结账(直接信用卡)选项会根据为当前浏览器设置的 cookie 以不同方式显示。

    如果您曾经使用相同的浏览器登录过任何 PayPal,它会找到一个 cookie 并假设您将再次登录,因此它会向您显示一个真正推动 PayPal 结帐的登录方面的登录页面.

    如果您清除浏览器缓存/cookie(或只是尝试使用新的浏览器),您应该会看到一个不同的登录页面,其中“访客结帐”选项会更显眼地显示。

    如果您切换到 Express Checkout API 而不是使用 Payments Standard,则可以强制 Guest Checkout 显示得更加醒目,而不管浏览器 cookie 是什么。 SetExpressCheckout 请求包含可用于相应调整结帐页面的参数。

    由于您使用的是 PHP,我建议您查看我的 PHP class library for PayPal。它将使您集成 Express Checkout 变得非常简单。基本上,它由以下 API 调用组成,这些调用包含在库的 /templates 目录中。

    您将用于处理访客结帐选项的参数位于 SetExpressCheckout 请求中,包括...

    • SOLUTIONTYPE=鞋底
    • LANDINGPAGE=计费
    • USERSELECTEDFUNDINGSOURCE=信用卡

    【讨论】:

    • 感谢您的支持,
    猜你喜欢
    • 2012-10-25
    • 2011-08-12
    • 2012-04-30
    • 2015-04-01
    • 2018-01-31
    • 1970-01-01
    • 2012-07-04
    • 2021-08-04
    • 2014-07-04
    相关资源
    最近更新 更多