dongquexi1990 2018-01-08 03:19
浏览 137

Paypal分期付款计划的自定义变量

I have decided to use Paypal's Payment Gateway method that allows my customer to have the option to pay the amount fully or have an installment plan for them to pay for the things they ordered.

I'm aware that you can define variables before the creation of the Installment Plan button. However, the problem with this is that the variables are predefined. enter image description here

What I'm looking for is if there's a way to change the value of these variables, how do I do so?

Here's my code for my cartbookout the page so far.

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="YQUKWHZVR23K8">
<table> 
<tr><td><input type="hidden" name="on0" value="plan"></td></tr>

<tr><td><input type="hidden" name="os0" value ="option_0"></td><td>

<strong>Installment for Programme</strong></td></tr>

<tr><td></td><td>Number of payments 4</td></tr><tr><td></td><td>Start 
payments At checkout</td></tr>
<tr><td></td><td>

<table>
<tr><th align="left">Due*</th><th align="right">Amount</th></tr>
<tr><td>At checkout</td><td align="right"><?php echo ($totalAmount/4) + 
"SGD" ; ?></td></tr><tr><td>Every 1 month (x 3)</td><td align="right"><?php 
echo ($totalAmount/4);?></td></tr><tr><td COLSPAN="2" ALIGN="right"><?php 
echo $totalAmount ?></td></tr></table></td></tr>
<tr><td colspan="3"><i>* We calculate payments from the date of checkout.
</i></td></tr></table>
<table><tr><td align=center><i></i></td></tr><tr><td><input type="image" 
src="https://www.paypalobjects.com/en_US/i/btn/btn_installment_plan_LG.gif" 
border="0" name="submit" alt="PayPal - The safer, easier way to pay 
online!"></td></tr></table>
<img alt="" border="0" 
src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" 
height="1">
</form>

I've tried to look up this issue on StackOverflow, but they were asking mostly on Payment in Full but not an Installment Plan method. Also, I've tried their solutions but to no avail.

Any help would be appreciated.

  • 写回答

1条回答 默认 最新

  • dsjpik057730 2018-01-12 21:12
    关注

    With the installment plan you can choose different amounts and very the time period for repayment. Keep in mind that only 4 installments are allowed. Providing a screen shot for a hosted button and the code for non hosted. Keep in mind we recommend you protect any non hosted buttons. Installment plan information on the PayPal Developer site:

    https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/installment_step_1/

    Non Hosted Button Code below (currently pointing to the sandbox):

    <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
    <input type="hidden" name="cmd" value="_xclick-payment-plan">
    <input type="hidden" name="business" value="youremail@email.com">
    <input type="hidden" name="lc" value="US">
    <input type="hidden" name="item_name" value="Test Installment Plan">
    <input type="hidden" name="no_note" value="0">
    <input type="hidden" name="cn" value="Add special instructions to the seller:">
    <input type="hidden" name="no_shipping" value="2">
    <input type="hidden" name="disp_tot" value="Y">
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="bn" value="PP-PaymentPlanBF:btn_installment_plan_LG.gif:NonHosted">
    <table>
    <tr><td><input type="hidden" name="on0" value="plan"></td></tr>
    <tr><td><input type="hidden" name="os0" value ="option_0"></td><td><strong>Variable Installments</strong></td></tr>
    <tr><td></td><tr><td></td><td>Number of payments 4</td></tr><tr><td></td><td>
    <table>
    <tr><th align="left">No.</th><th align="left">Due*</th><th align="right">Amount</th></tr>
    <tr><td>1</td><td>At checkout</td>
    <td align="right">$50.00 USD</td></tr><tr><td>2</td><td>after 1 week</td>
    <td align="right">$75.00 USD</td></tr><tr><td>3</td><td>after 2 weeks</td>
    <td align="right">$85.00 USD</td></tr><tr><td>4</td><td>after 3 weeks</td>
    <td align="right">$90.00 USD</td></tr><tr><td COLSPAN="3" ALIGN="right">Total   $300.00 USD</td></tr></table></td></tr>
    <tr><td colspan="3"><i>* We calculate payments from the date of checkout.</i></td></tr></table>
    <input type="hidden" name="option_select0" value="option_0">
    <input type="hidden" name="option_select0_name" value="Variable Installments">
    <input type="hidden" name="option_select0_type" value="V">
    <input type="hidden" name="option_select0_a0" value="50.00">
    <input type="hidden" name="option_select0_p0" value="0">
    <input type="hidden" name="option_select0_t0" value="W">
    <input type="hidden" name="option_select0_n0" value="1">
    <input type="hidden" name="option_select0_a1" value="75.00">
    <input type="hidden" name="option_select0_p1" value="1">
    <input type="hidden" name="option_select0_t1" value="W">
    <input type="hidden" name="option_select0_n1" value="1">
    <input type="hidden" name="option_select0_a2" value="85.00">
    <input type="hidden" name="option_select0_p2" value="2">
    <input type="hidden" name="option_select0_t2" value="W">
    <input type="hidden" name="option_select0_n2" value="1">
    <input type="hidden" name="option_select0_a3" value="90.00">
    <input type="hidden" name="option_select0_p3" value="3">
    <input type="hidden" name="option_select0_t3" value="W">
    <input type="hidden" name="option_select0_n3" value="1">
    <input type="hidden" name="option_index" value="0">
    <table><tr><td align=center><i>Sign up for</i></td></tr><tr><td><input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_installment_plan_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"></td></tr></table>
    <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </form>
    

    Here is a screen shot for a hosted button: enter image description here


    Thanks,
    Jennifer

    评论

报告相同问题?

悬赏问题

  • ¥15 对于这个问题的代码运行
  • ¥50 三种调度算法报错 有实例
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败