I've found that I am able to provide a placeholder invoice number to the Cordova application to pass on to PayPal.
PayPal can then send this invoice number along with relevant transaction details to the Magento server via an IPN. This takes the client out of the picture and fits my needs.
So really the workflow is as follows:
- The client clicks on the 'PayPal Button'
- A request is sent to the Magento Server to create an order and placeholder invoice
- The Magento Server provides the placeholder invoice number to the client
- The order is now 'Pending Payment' in Magento
- The client proceeds to PayPal to make the payment
- If the client successfully pays, an IPN is sent to the Magento Server and the client is returned to the App payment success page
- If the client fails to pay and fails to return to the app, the order will remain as 'Payment Pending' to be cancelled by a crontask every so often
- If the client fails to pay and successfully returns to the app, the app will contact the Magento Server and immediately cancel the order
I'm severely disappointed by the lack of documentation / support for this product.