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.
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.