Support

Home Forums Event Espresso Premium Add Transaction ID to Paypal Payment Details

Add Transaction ID to Paypal Payment Details

Posted: November 4, 2015 at 5:48 pm

Viewing 5 reply threads


raffy

November 4, 2015 at 5:48 pm

I have a question on this closed post: https://eventespresso.com/topic/add-ee4-transaction-id-to-paypal-payment-details/

It was unresolved.

Any updates?


Josh

  • Support Staff

November 4, 2015 at 6:52 pm

Hi Raffy,

You can include the EE4 Transaction ID with the PayPal Payment details by passing it to the PayPal item_number field. It involves adding the following code to your site:

add_filter( 'FHEE__EEG_Paypal_Standard__set_redirection_info__arguments', 'jf_ee_set_transaction_id_as_paypal_item_id' );
function jf_ee_set_transaction_id_as_paypal_item_id( $redirect_args ) {
    $checkout = EE_Registry::instance()->SSN->checkout();
    if ( $checkout instanceof EE_Checkout ) {
        $transaction = $checkout->transaction;
        if ( $transaction instanceof EE_Transaction ) {      
            $redirect_args[ 'item_number' ] = $transaction->ID();
        }
    }
    return $redirect_args; 
}

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


raffy

November 4, 2015 at 8:51 pm

Understood, all I have to do is add the code to a functions plugin or into my WordPress theme’s functions.php file.

Thanks.

Raffy


Josh

  • Support Staff

November 5, 2015 at 8:17 am

If you go the route where you add the code to a plugin, you will also need to activate the plugin.


raffy

November 6, 2015 at 2:27 am

Could you keep this open for a bit. I am about to renew my EE4 subscription and I will implement changes there. Thank you, Josh.

Or should I just open a new one if I have further questions.


Tony

  • Support Staff

November 6, 2015 at 3:26 am

Hi Raffy,

Forum threads will automatically close if there is no activity for 2 weeks, so we won’t close this thread ourselves but it may do so automatically anyway.

If that does happen please feel free to open up a new thread with any issue you may have.

Viewing 5 reply threads

The support post ‘Add Transaction ID to Paypal Payment Details’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso