PayPal IPN values are being received in the thank you page rather than IPN page

59
November 16, 2018, at 11:40 AM

I see PayPal hits the ipn.php however, I'm unable to see/catch any data through $_REQUEST or $_POST. From this post-Not receiving any IPN post for sandbox account I see I need to enable the IPN but I'm unable to locate it.

This is my PHP code

mysqli_query($con,"INSERT INTO dumped (dumped)
    VALUES (".$_REQUEST.")");

But when I enter the below code I see data is inserted into DB Table.

mysqli_query($con,"INSERT INTO dumped (dumped)
    VALUES ('blablabla')");

Below is the form which submitted:

define( 'SSL_URL', 'https://www.paypal.com/cgi-bin/webscr' );
            define( 'SSL_SAND_URL', 'https://www.sandbox.paypal.com/cgi-bin/webscr' );
            $action = '';
            //Is this a test transaction? 
            $action = ($data['paypal_mode']) ? SSL_SAND_URL : SSL_URL;
            $form = '';
            $form .= '<form name="frm_payment_method" action="' . $action . '" method="post">';
            $form .= '<input type="hidden" name="business" value="' . $data['merchant_email'] . '" />';
            // Instant Payment Notification & Return Page Details /
            $form .= '<input type="hidden" name="notify_url" value="' . $data['notify_url'] . '" />';
            $form .= '<input type="hidden" name="cancel_return" value="' . $data['cancel_url'] . '" />';
            $form .= '<input type="hidden" name="return" value="' . $data['thanks_page'] . '" />';
            $form .= '<input type="hidden" name="rm" value="2" />';
            // Configures Basic Checkout Fields -->
            $form .= '<input type="hidden" name="lc" value="" />';
            /*$form .= '<input type="hidden" name="no_shipping" value="1" />';
            $form .= '<input type="hidden" name="no_note" value="1" />';*/
            // <input type="hidden" name="custom" value="localhost" />-->
            $form .= '<input type="hidden" name="currency_code" value="' . $data['currency_code'] . '" />';
            //$form .= '<input type="hidden" name="page_style" value="paypal" />';
            $form .= '<input type="hidden" name="charset" value="utf-8" />';
            $form .= '<input type="hidden" name="item_name" value="' . $data['product_name'] . '" />';
            $form .= '<input type="hidden" value="_xclick" name="cmd"/>';
            $form .= '<input type="hidden" name="amount" value="' . $data['amount'] . '" />';
            $form .= '</form>';
            $form .= '<script>';
            $form .= 'setTimeout("document.frm_payment_method.submit()", 0);';
            $form .= '</script>';
            return $form;

The values I'm receiving in the thank you page looks like;

Array ( [payer_email] => niladrib.banerjee@XXXX [payer_id] => WN6EJUKG27CZ8 [payer_status] => VERIFIED [first_name] => Niladri [last_name] => Banerjee [address_name] => Niladri Banerjee [address_street] => 1 Main St [address_city] => San Jose [address_state] => CA [address_country_code] => US [address_zip] => 95131 [residence_country] => US [txn_id] => XXX [mc_currency] => USD [mc_fee] => 0.46 [mc_gross] => 5.50 [protection_eligibility] => ELIGIBLE [payment_fee] => 0.46 [payment_gross] => 5.50 [payment_status] => Completed [payment_type] => instant [item_name] => Demo Product [quantity] => 1 [txn_type] => web_accept [payment_date] => 2018-11-15T12:02:01Z [business] => niladrib.banerjee-facilitator@XXXXX [receiver_id] => 9K4AYW8P9K555 [notify_version] => UNVERSIONED [verify_sign] => Au.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX )
READ ALSO
Codeigniter Community Auth can&#39;t login after create user

Codeigniter Community Auth can't login after create user

I am using community auth (https://community-authcom/) for my project but login functionality is not working

73
Content-Type header value

Content-Type header value

What does Content-Type header field really mean in the request? Tho official docs say

88
PHP, JSON - Receive just fields with exact value

PHP, JSON - Receive just fields with exact value

with the following code i get values from a json-list

89
WordPress WooCommerce Staging Site Database Sync

WordPress WooCommerce Staging Site Database Sync

I manage a WordPress WooCommerce site which has a couple mishaps in the recent pastThere is no staging environment setup which would have prevented the mishaps and is not trying to set one up

62