How to add tax to PayPal Installment Button - html

I have a business PayPal account. I have added an installment button for a product on my website. On checkout, the tax is not calculated or added to total. My tax table in PayPal is correct. I notice that the Buy Now buttons have tax instructions when you create them but the Installment Button does not.
I searched the Questions already asked and thought I found the answer by adding the following code to the button html. It didn't work.
<input type="hidden" name="tax_rate" value="5">
How do I add the 5% tax to Payment 1 and to Payment 2 and it shows on the checkout and the invoice?
I have a limited understanding of html and I am hoping it is something simple.

You cannot add tax as a separate line item as Installment Plans accept only one "amount" to spread out over the installment time. You can add tax and shipping to the total amount you are going to charge, though. However, it will not show as a "tax" line on the invoice.

Related

Limiting HTML Text bar to Only one Entry of Specific Characters

I currently have the code:
<td><input name="miles" type="number"
min="0" max="900" size="5" onkeyup="this.value=this.value.replace(/[^0-9.]+/g,'')"/></td>
This(onkeyup="this.value=this.value.replace(/[^0-9.]+/g,'')) limits the user to only entering digits and periods. What I want to do, however, is make it so that the user can only enter one period, and after that, every other period will be deleted. Is this possible? Thank you for taking the time to read this post, and have a wonderful day!
To accept only one period for input, you have to make it clear, that the period should repeat once only.
So this one may work in your case:
^-?[0-9]\d*(\.\d+)?$
NOTE: You can check the details of every regex here.

Paypal HTML Buttons - Upper limit to payments?

I'm having a HTML Paypal Button doing weird things.
It's on a site for Art buyers, and so the range of prices is pretty wild. There are 500$ artpieces to 4000$ art pieces.
When I try to buy the 500$ art piece, everything goes through no problem. But when I try to buy one at 2000$, I get a generic error message.
Sorry, we can’t complete your purchase at this time
Please return to the merchant and choose another way to pay.
Now I know it's not a failure of my form. It's the same form that is loaded every time; there's just the amount_1, item_name_1 and item_number_1 fields that change.
So it makes me think it's something with the price. Is there an upper limit to transactions in Sandbox mode? or is there an upper limit for Paypal HTML Buttons? I searched, and couldn't seem to find a straight answer to that.
EDIT: As asked by mplungjan, here is a basic try of the code. Only things that vary in both forms are price and name.
https://jsfiddle.net/fredy31/mrfn8e3b/5/
<input type="hidden" name="item_name_1" value="3000$ Product">
<input type="hidden" name="item_number_1" value="3000-product">
<input type="hidden" name="amount_1" value="3000">
And I've done a bit of research. Tried to find a response to this, but couldn't find a straight answer. What I've found is this: https://www.paypal-community.com/t5/About-Payments-Archive/What-is-the-transaction-amount-limit/td-p/616278 but it says the limit is 10k, and I'm still far from that.

Edit tax percent on edit order page

How we can edit tax percent on Edit order page
admin panel->sales->orders->view->orderview->edit order
as you can see in the screenshot I've made the tax percent field editable now what I want from this is when the admin clicks the 'Update Items and Qty`s' button the tax percent (Which I made editable) also get updated with ref. to that order and the grand total of that order will be calculated by the updated tax percent.
will appreciate any suggestion to achieve that.
Thanks.

How to show/hide anchor tag on the basis of database value

In my aspx page i have listview in which i have three tags one for hotel invoice second for package third for vehicle all 3 are visible now what i want if at first time user create hotel invoice then in database its invoice type is saved next time when user open that page on the basis of invoice type only that tag should be visible like if user create hotel invoice then only hotel invoice tag should be visible and if vehicle invoice was created then only vehicle invoice tag should be visible other two should be invisible.
Can anyone help me in this issue.
thanks in advance for your help.
<a style="style='<%# DataBinder.Eval(Container.DataItem, "Class.YourDbValue") == null ? "display:block;": "display:none;"%>'>>"
#AkshayRandive I think what he means is that his InvoiceType is based on the 3 values
<%
if(DataBinder.Eval(Container.DataItem, "Class.InvoiceType") != null)
{
Hotel Invoice
}
%>
Something like this should only show Hotel Invoice when you have an existing type.
You could make the link value dynamic but you can figure that out yourself.

Form with more submits and submiting by Enter

This question is somehow similar to this one.
I have a form in my ecommerce solution. When you insert something into the cart, you can change number of items. The cart is whole in one form. The form has two submit buttons - recalcualte and continue (which will take buyer to Step 2 of the process).
When user changes the number of items using the inputs, he can either hit recalculate (which sends post to app that will change the numbers in session/db) or continue (that will also send the post data to recalculate and then take user to the step 2).
But when user hits enter, the recalculate button takes precedence.
What I want is to make the recalculate button submit the form, but ONLY when clicked and NOT when submited by pressing enter. In contrast the "continue" button should work also with enter.
The solution MUST NOT use javascript as the frontend has to be useable without JS enabled.
Any ideas?
Put the button that takes precedence first in your html sourcecode, and use markup to invert the position of the two buttons?
Edit: you say your layout can't handle that.
Either:
1. Change the layout. Functionality is more important, and for layout there is more than one way to do it.
2. Have the form not check if "recalculate" or "submit" was pressed, but rather if the shown price was correct with the calculated prize. Example:
User buys 1 item, value 3 dollar.
User buys 2 items, value 5 dollar.
Total prize: 13 dollar.
User now changes the 1 item into 4 items. 3 dollar becomes 12 dollar, but he doesn't hit recalculate.
Have a field in your form that shows the total amount (a hidden field is nicest). When the user submits the form, redo the calculation. If the calculated prize equals the prize in the hidden field, the user knew the final correct prize. If it differs, reshow the form mentioning "You changed your shopping cart, the total prize has been updated to reflect these changes. Verify the amount and submit to purchase" or something.
<input type="text" id="mytext" ... />
<script type="text/javascript">
document.getElementById("mytext").onkeyup = function(event) {
if(event.keyCode=='13' || event.keyCode=='10') {
alert('you pressed enter');
// do whatever you want when enter is detected
}
}
</script>
You should be able to decide that server-side. When a button is clicked it's name-value pair is submitted, but when return is pressed it isn't. So change your server-side script to do "recalculate" when the recalculate name-value is submitted and to contine in all other cases.