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 GetExpressCheckoutDetails
or DoExpressCheckout
.
Please let me know what you think is best, from your own experiences.
Thanks
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With