Since installing WC Vendors, every new order in my store is set the “Failed” status, even though PayPal.com shows that payment goes through successfully. I checked my IPN settings in WooCommerce as well as my PayPal settings and matched them both to their guide.
I check my error log and found a bunch of paypal related messages:
[15-Sep-2015 18:49:57 UTC] PPAPIService: Request: requestEnvelope.errorLanguage=en_US&actionType=CREATE&cancelUrl=https://{my domain}/cart/?cancel_order=true&order=wc_order_{hidden}&order_id={order ID}&redirect&_wpnonce={hidden}¤cyCode=USD&feesPayer=EACHRECEIVER&ipnNotificationUrl=http://{my domain}/?wc-api=WC_PayPalAP&paypal_chain_ipn=1&order_id={order ID}&receiverList.receiver(0).amount=255.3&receiverList.receiver(0).email={my paypal email}&receiverList.receiver(0).invoiceId={order ID}&reverseAllParallelPaymentsOnError=1&returnUrl=https://{my domain}/checkout/order-received/{order ID}?key=wc_order_{hidden}&order-received={order ID}
[15-Sep-2015 18:49:58 UTC] PPHttpConnection: Adding header X-PAYPAL-SECURITY-USERID: {my user id}
[15-Sep-2015 18:49:58 UTC] PPHttpConnection: Adding header X-PAYPAL-SECURITY-PASSWORD: {my pw}
[15-Sep-2015 18:49:58 UTC] PPHttpConnection: Adding header X-PAYPAL-SECURITY-SIGNATURE: {my sig}
[15-Sep-2015 18:49:58 UTC] PPHttpConnection: Adding header X-PAYPAL-APPLICATION-ID: {my app id}
[15-Sep-2015 18:49:58 UTC] PPHttpConnection: Adding header X-PAYPAL-REQUEST-DATA-FORMAT: NV
[15-Sep-2015 18:49:58 UTC] PPHttpConnection: Adding header X-PAYPAL-RESPONSE-DATA-FORMAT: NV
[15-Sep-2015 18:49:58 UTC] PPHttpConnection: Adding header X-PAYPAL-DEVICE-IPADDRESS: {my server IP}
[15-Sep-2015 18:49:58 UTC] PPHttpConnection: Adding header X-PAYPAL-REQUEST-SOURCE: sdk-adaptivepayments-php_1.2.95
[15-Sep-2015 18:49:58 UTC] PPHttpConnection: Invalid or no certificate authority found, retrying using bundled CA certs
[15-Sep-2015 18:49:59 UTC] PPAPIService: Response: responseEnvelope.timestamp=2015-09-15T11%3A50%3A00.819-07%3A00&responseEnvelope.ack=Success&responseEnvelope.correlationId={hidden}&responseEnvelope.build=17820627
[15-Sep-2015 18:49:59 UTC] Pay: Received SetPaymentOptionsResponse:
[15-Sep-2015 18:50:38 UTC] PHP Notice: Undefined index: status in {wp-content path}\plugins\wc-vendors\classes\gateways\PayPal_AdvPayments\paypal_ap.php on line 118
[15-Sep-2015 18:50:38 UTC] PHP Notice: Undefined index: status in {wp-content path}\plugins\wc-vendors\classes\gateways\PayPal_AdvPayments\paypal_ap.php on line 119
So the final two errors reference paypal_ap.php which contains:
public function paypal_ap_ipn()
{
{...}
if ( $_POST[ 'status' ] !== 'COMPLETED' ) {
$order->update_status( 'failed', sprintf( __( 'Something went wrong. Response from PayPal invalidated this order. Status: %s.', 'wcvendors' ), $_POST[ 'status' ] ) );
exit;
}
{...}
}
Any advice?