Paypal is sending dates to my Rest service in this format 09:30:12 Jan 02, 2022 PST
If I use the DateTime.valueOf()
function to translate the value to a DateTime field, it fails with an invalid date/time format error.
Is there any built-in functionality in Apex that will help me convert this format to a DateTime field? I am going through the documentation but haven't found anything yet.
The values being sent by Paypal IPN are being sent in the request.params
An example of the params being sent by the IPN.I have captured these in the user debug logs.
USER_DEBUG|[24]|DEBUG|business ==> sb-147na4709042@business.example.com
USER_DEBUG|[24]|DEBUG|payment_status ==> Completed
USER_DEBUG|[24]|DEBUG|mc_currency ==> USD
USER_DEBUG|[24]|DEBUG|shipping_discount ==> 0.00
USER_DEBUG|[24]|DEBUG|txn_type ==> web_accept
USER_DEBUG|[24]|DEBUG|mc_gross ==> 466.78
USER_DEBUG|[24]|DEBUG|ipn_track_id ==> 11eacc648df9b
USER_DEBUG|[24]|DEBUG|payment_date ==> 09:30:12 Jan 02, 2022 PST