-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add filter for merchant order reference #23
Add filter for merchant order reference #23
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this with the merchant order reference setting set to GF form #{gf_form_id} + entry #{gf_entry_id}
, but this resulted in GF form #2 + entry #278242912
for Gravity Forms entry ID 2782
. It appears the payment ID (42912
) is appended by Payment::format_string()
as the setting does not contain {order_id}
nor {payment_id}
.
In case of Gravity Forms, the user could also set the order ID setting in the payment feed of the form. This setting supports all Gravity Forms merge tags. The value of GF form #{form_id} + entry #{entry_id}
there will result in the expected merchant order reference Gravity Forms form #2 + entry #2783
. We don't need the filter for this case.
The user provided the below sample code, which I think this will result in the payment ID being appended to the contract ID. I'm not sure how we can improve this — in the Payment::format_string()
method?
$merchant_order_reference = rgar( $entry, strval( self::CONTRACT_ID_FIELD ) );
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved the issue with forced adding of a dynamic part (payment ID). I think this PR can now be merged.
Awaiting response from customer in https://secure.helpscout.net/conversation/2282196531/25812?folderId=1425710.