How can I send $txn_id (PayPal) in the "Email to Admin after payment"?

Discussion in 'Payments processing' started by listen2russian, Dec 24, 2008.

  1. listen2russian

    listen2russian New Member

    Joined:
    Dec 17, 2008
    Messages:
    6
    The PayPal {$payment.payment_id} is incorrectly assigned to the wrong variable

    Currently, the only option to send a PayPal receipt number in the "Email to Admin" template is {$payment.receipt_id}

    (Note: {$payment.payment_id} only returns the internal aMember receipt number)


    However, {$payment.receipt_id} is NOT the receipt number the customer receives during their sign-up process (the one they print out after payment). What is actually being attached to {$payment.receipt_id} is the "txn_id" variable, but really the "receipt_id" should be attached.


    Can anyone please help me get the correct variable "receipt_id" attached to {$payment.receipt_id}?

    Thanks very much,

    Jon.
  2. CrackBaby

    CrackBaby Member

    Joined:
    Aug 22, 2006
    Messages:
    154
    have you tried?

    {$payment.txn_id}
  3. listen2russian

    listen2russian New Member

    Joined:
    Dec 17, 2008
    Messages:
    6
    Hi CB,

    Yeah I tried that var.

    I've been running the PayPal sandbox quite a bit lately and it turns out that the hidden "txn_id" is only sent to aMember when processing a credit card transaction - if a user pays via their PayPal account then it isn't sent.

    So it turns out that it's probably best to have some consistent transaction ID appearing (the default amember setup), rather than have blank spots in the customer data, which will occur when PayPal doesn't send the data.

    The reason I wanted this txn_id sent to my email is to efficiently handle customer complaints about payment processing (if something goes wrong in the communication between paypal and amember).

    When the customer completes a transaction they are given a receipt number, which is same as the "txn_id" variable that appears in amember in the large grey box below the transaction details (accessed via the customer management area).

    Originally I wanted this receipt number emailed to me so I could easily search for it in my email account, but Alex showed me that it's possible to search through amember for this "txn_id" variable, and it works. (Im not at home with access to admin CP at the moment but if you want to know how to do this type of search just post here).

    So, the issue is resolved! :) spasibo to alex!

Share This Page