php - PayPal Sandbox We're sorry, things don't appear to be working at the moment. Please try again later

 <form action="" name="pay" class="pay" id="pay" method="POST" onsubmit="return true">
                    <!-- Identify your business so that you can collect the payments. -->
                    <input type="hidden" name="business" value="MY EMAIL">
                    <!-- Specify a Buy Now button. -->
                    <input type="hidden" name="cmd" value="_xclick">
                    <!-- Specify details about the item that buyers will purchase. -->
                    <input type="hidden" id="item_name" name="item_name" value="test">
                    <input type="hidden" id="amount" name="amount" value="00">
                    <input type="hidden" name="currency_code" value="SGD">
                    <input type="hidden" name="rm" value="1">

                    <!-- Specify URLs -->
                    <input type='hidden' name='cancel_return' value='<?=base_url('/order/cancel/')?>'>
                    <input type='hidden' id="return" name='return' value='<?=base_url('/order/success/')?>'>
                    <input type='hidden' id="notify_url" name='notify_url' value='<?=base_url('/order/ipn/')?>'>

This is my form. And i pass value in by AJAX

        var quantity = $(this).val();
        var amount = $('#amount');
        var item_name = $('#item_name');
        var email = '<?=$this->session->userdata('email').''?>';

        if(quantity == 'one') {
            item_name.val(email+' & 1 Box');
            return true;

        else if(quantity == 'two') {
            item_name.val(email + ' & 2 Box');
        else {
            return true;

It works like charm until today. I didn't modify anything. And I launch my localhost on LAMPP suddenly can't process with PayPal. I found that if the

<input type="hidden" id="amount" name="amount" value="00">

value is set to 1 or more will not work. if 00 will redirect me to paypal to enter the total amount. Just happened and I got no clue why. Please help, thanks in advance.




It works now. The problem came from PayPal sandbox. Need some time until it get back stable.

People are also looking for solutions to the problem: php - laravel datatable take long time to load data


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.