mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-23 22:08:11 -05:00
Remove user id from authorize.net invoice number
Previously, invoice number was [user_id]T[link_id]C[campaign_id]. Since campaigns are represented as Things now, their ids are longer, putting us over the 20 char limit for invoice numbers defined in the authorize.net xml api. (see https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd ) Now invoice number will be T[link_id]C[campaign_id], which is still unique across campaigns since a link is always associated with only one user
This commit is contained in:
@@ -116,7 +116,7 @@ def auth_transaction(amount, user, payid, thing, campaign, test = None):
|
||||
return bid.transaction, ""
|
||||
|
||||
elif int(payid) in PayID.get_ids(user):
|
||||
order = Order(invoiceNumber = "%dT%dC%d" % (user._id, thing._id, campaign))
|
||||
order = Order(invoiceNumber = "T%dC%d" % (thing._id, campaign))
|
||||
success, res = _make_transaction(ProfileTransAuthOnly,
|
||||
amount, user, payid,
|
||||
order = order, test = test)
|
||||
|
||||
Reference in New Issue
Block a user