Is the paypal’s
Token ID which it returns (ie:
EC-XXXXXXXXXXXXXXXXX), always unique? i am doubting it would be? But what i am doing is that i am inserting it to my transaction table to verify if this transaction has already been processed.
I know Transaction ID can work too, but the thing is that the Token ID is returned first before even using the PayPal API methods such as
Please let me know what you think is best, from your own experiences.
The Token is unique, but it only represents the session, which is why it is returned first. It does not indicate a complete transaction at all, and you shouldn’t store it for that purpose. I would not recommend storing it for future use anyway, because PayPal doesn’t use it to identify the transaction for refunds, etc (that I’ve seen at least).
I recommend you only use the Token to manage the actual checkout flow going from
SetExpressCheckout -> GetExpressCheckoutDetails -> DoExpressCheckoutPayment, and then store the TransactionID returned from
DoExpressCheckoutPayment as your “transaction complete” indicator. You should probably check the
PaymentStatus return, too, since eChecks do not give the money to your account right away.
Transaction ID is unique for transaction.
Token ID is a number that created for check if is correct the Transaction ID.