Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Payment.create & repeattransaction in Authorize.net #26620

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Switch to Payment.create & repeattransaction in Authorize.net

Before

completeOrder called for both repeattransaction and payment.create/completetransaction

After

Api calls to Payment.create & Contribution.repeattransaction

Technical Details

Comments

@civibot
Copy link

civibot bot commented Jun 23, 2023

(Standard links)

@civibot civibot bot added the master label Jun 23, 2023
@seamuslee001
Copy link
Contributor

this seems fine

@seamuslee001 seamuslee001 merged commit 2ad8b9b into civicrm:master Jun 23, 2023
@seamuslee001 seamuslee001 deleted the anet branch June 23, 2023 20:25
@@ -3816,6 +3816,7 @@ public static function isSingleLineItem($id) {
*/
public static function completeOrder($input, $recurringContributionID, $contributionID, $isPostPaymentCreate = FALSE) {
if (!$contributionID) {
CRM_Core_Error::deprecatedFunctionWarning('v3api Contribution.repeattransaction. This handling will be removed around 5.70 (calling this function directly has never been supported outside core anyway)');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattwire it's the end of an era!!!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eileenmcnaughton Shouldn't this say "Contribution.completetransaction"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattwire nope - this is the calling of completeOrder to call repeattransaction that is deprected

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, the comment confuses me :-)

@mattwire
Copy link
Contributor

@eileenmcnaughton This has caused a regression. There doesn't seem to be any test coverage catching it but expected behaviour for the contribution trxn_id is that it concatenates with payment trxn_ids.

This has triggered a bunch of test failures in Stripe:

1) CRM_Stripe_IpnTest::testNewOneOffStripeCheckout
Expected Contribution.trxn_id = "pi_mock,ch_mock"
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'pi_mock,ch_mock'
+'ch_mock'

See https://github.com/SemperIT/CiviCARROT/actions/runs/5370451060/jobs/9742545452

@@ -188,6 +188,7 @@ public static function create(array $params): CRM_Financial_DAO_FinancialTrxn {
'is_post_payment_create' => TRUE,
'is_email_receipt' => $params['is_send_contribution_notification'],
'trxn_date' => $params['trxn_date'],
'trxn_id' => $params['trxn_id'] ?? NULL,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line has caused a regression and change in behaviour in CiviCRM core - see comment on main PR and test failures https://github.com/SemperIT/CiviCARROT/actions/runs/5370451060/jobs/9742545452

mattwire added a commit to mattwire/civicrm-core that referenced this pull request Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants