0

Following is the PayPal form and form submission script. It works well in Android and Desktop but when link is opened from Facebook messenger in iPhone, it shows PayPal 404 not found page.

Reference code is as below:-

<form action="<?php echo $paypal_form_url; ?>" method="post" id="pyPal">
        <input type="hidden" name="cmd" value="_xclick">
        <input type="hidden" name="business" value="<?php echo $paypal_email; ?>">
        <input type="hidden" name="item_name" value="<?php echo strtoupper( str_replace("_", " ", $record_find_slug['NewCheckout']['name']) ) ?>">
        <input type="hidden" name="item_number" value="NA">
        <input type="hidden" id="paypal_amount" name="amount" value="<?php echo $payment_data['CheckoutUser']['amount'] ?>">
        <input type="hidden" name="no_shipping" value="0">
        <input type="hidden" name="no_note" value="1">
        <input type="hidden" name="currency_code" value="USD">
        <input type="hidden" name="lc" value="AU">
        <input type="hidden" name="bn" value="PP-BuyNowBF">
        <input type="hidden" name="rm" value="2">
        <input type="hidden" id="paypal_invoice_id" name="invoice" value="<?php echo base64_decode($invoice_id); ?>">
        <input type="hidden" id="paypal_return" name="return" value="<?php echo $return_url; ?>">
        <input type="hidden" name="notify_url" value="<?php echo BASE_URL ?>/checks/paypal_payment">
        <input style="display: none;" id="paypal_submit_trigger" type="image" src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/PP_logo_h_150x38.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
        <img alt="" border="0" src="https://www.paypal.com/en_AU/i/scr/pixel.gif" width="1" height="1">
    </form> 

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript">
    setTimeout(function(){ $("#pyPal").submit(); }, 3000);
</script>
9
  • What HTML does this render to when fetched from a browser? Mar 16 at 10:42
  • @PrestonPHX HTML 5 Mar 16 at 10:44
  • The contents of the page Mar 16 at 10:49
  • @PrestonPHX Please review - prnt.sc/gvotALGkcHJx Mar 16 at 10:59
  • @PrestonPHX after 3 seconds page redirects to PayPal 404 not found page. this happens only when link shared in Facebook Messenger on IPhone, in other cases works fine. Mar 16 at 11:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy