jebarrow
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Plugins
In reply to: [WP eCommerce] IPN with Paypal Standard is not workingI was able to fix this problem by updating the paypal-standard.merchant.php file
seems that the IPN message was being received and verified, but the method never actually updated the purchase.
Here is my version of that method if it will help anyone.
/** * parse_gateway_notification method, receives data from the payment gateway * @access private */ function parse_gateway_notification() { /// PayPal first expects the IPN variables to be returned to it within 30 seconds, so we do this first. $paypal_url = get_option( 'paypal_multiple_url' ); $received_values = array(); $received_values['cmd'] = '_notify-validate'; $received_values += stripslashes_deep( $_REQUEST ); $options = array( 'timeout' => 20, 'body' => $received_values, 'user-agent' => ( 'WP e-Commerce/' . WPSC_PRESENTABLE_VERSION ) ); $response = wp_remote_post( $paypal_url, $options ); if ( 'VERIFIED' == $response['body'] ) { $this->paypal_ipn_values = $received_values; $this->session_id = $received_values['invoice']; if ( strtolower( $received_values['payment_status'] ) == 'completed' ) { $this->set_purchase_processed_by_sessionid( 3 ); transaction_results( $this->session_id, false ); } elseif ( strtolower( $received_values['payment_status'] ) == 'denied' ) { $this->set_purchase_processed_by_sessionid( 6 ); } } else { exit( "IPN Request Failure" ); } }
Viewing 1 replies (of 1 total)