I have set up a test PayPay Express payment processor and created a contribution page that allows the user to create a recurring donation.
When I use this page, I get the "PayPal Checkout" button appears and takes me to PayPal. Everything proceeds as expected with the PayPal screens and I get taken back to my site, where I am told I need to click the "Make Contribution" button. I do that and get back a page that says:
Notice: Undefined index: returnURL in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 372 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: cancelURL in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 373 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: installments in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 380 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: transactionid in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 399 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: amt in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 400 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: feeamt in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 401 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: settleamt in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 402 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: paymentstatus in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 406 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: pendingreason in CRM_Core_Payment_PayPalImpl->createRecurringPayments() (line 407 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Core/Payment/PayPalImpl.php).
Notice: Undefined index: payment_status_id in CRM_Contribute_BAO_Contribution_Utils::processConfirm() (line 198 of /var/www/html/SOTS/sites/all/modules/civicrm/CRM/Contribute/BAO/Contribution/Utils.php).
It also says that the payment was successful, but when I look at it in CiviCRM, it has a status of "Pending" and my PayPal account shows no notification was sent.
I have done some digging. After the "Make Contribution" button is pressed, the application ends up in PayPalImpl.php, createRecurringPayments(...). This never sets the $param['payment_status_id']. Later on, the application gets to Confirm.php, completeTransaction(), which looks for $result['payment_status_id'] of 1. Only if this is true does the transaction get marked as completed.
So, the question is, should createRecurringPayments() set the payment_status_id, and to what?
Note that if I try with a single donation, it works ok (i.e. the transaction is marked as complete).
Thanks