From 23cfc7a6cc842516484ada4917e871da23d85f93 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 14 Jun 2019 15:50:27 -0400 Subject: [PATCH] Fix A.net to resolve time when using default This is presumably passed through to the contribution api & hence it is not so grumpy but when passed to the activity create fn it is failing when the test is run in isolation (& maybe other scenarios?) due to 'now' not being parsed --- CRM/Core/Payment/AuthorizeNetIPN.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Payment/AuthorizeNetIPN.php b/CRM/Core/Payment/AuthorizeNetIPN.php index a6beaf1231..d09276b9b2 100644 --- a/CRM/Core/Payment/AuthorizeNetIPN.php +++ b/CRM/Core/Payment/AuthorizeNetIPN.php @@ -230,6 +230,7 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { * @param array $ids * * @return bool + * @throws \CRM_Core_Exception */ public function getInput(&$input, &$ids) { $input['amount'] = $this->retrieve('x_amount', 'String'); @@ -241,7 +242,7 @@ class CRM_Core_Payment_AuthorizeNetIPN extends CRM_Core_Payment_BaseIPN { $input['subscription_paynum'] = $this->retrieve('x_subscription_paynum', 'Integer', FALSE, 0); $input['trxn_id'] = $this->retrieve('x_trans_id', 'String', FALSE); $input['trxn_id'] = $this->retrieve('x_trans_id', 'String', FALSE); - $input['receive_date'] = $this->retrieve('receive_date', 'String', FALSE, 'now'); + $input['receive_date'] = $this->retrieve('receive_date', 'String', FALSE, date('YmdHis', strtotime('now'))); if ($input['trxn_id']) { $input['is_test'] = 0; -- 2.25.1