Skip to content

Commit

Permalink
Remove user id from authorize.net invoice number
Browse files Browse the repository at this point in the history
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
  • Loading branch information
shlurbee committed May 29, 2012
1 parent 09dbd49 commit 76142d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion r2/r2/lib/authorize/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 76142d5

Please sign in to comment.