2013-10-20

Adding information to a WePay Button transaction

The community association I help out with has been using Google Checkout Buy Now buttons for a couple of years, but Google is pulling the plug next month.

The closest similar provider I have found is WePay. However, they do not explicitly support dynamically adding information to Button transactions, like Google Checkout Buy Now (and Paypal buttons).

There is a reference_id property of the Button widget Javascript object that is available for use, the value of which appears in the order records, and a little spelunking showed that it can be accessed as:

window.WePay.widgets[0].widget_options.reference_id = "1-2-3-4-5-6-7";

I hope this helps someone else with a similar issue - the information is not on the WePay knowledgebase that I can find, and WePay support seemed uninterested in the issue.

No comments: