5

I'm new to Balanced Payments and jquery, and relativley new to Django. Anyway, I'm trying to understand how to setup buyer and merchant Balanced Payment accounts using Django forms and the balanced.js and examples/doc provided by Balanced Payments. However, I don't quite understand what's validating what. I thought that the form used jquery to interface with Balanced Payments to validate the data before allowing the form to be submitted, but now I realize that the form is submitted somehow to Balanced Payments, which then calls the javascript callback function, which then needs to process the submit action based on the results from Balanced Payments.

Anyway, has anyone does this already? A working example would be incredibly helpful -- more helpful than trying to piece things together from the various docs.

The Python docs for settting up Balanced Payments buyer accounts are here: https://www.balancedpayments.com/docs/python/buyer

And someone posted the example HTML & javascript here: https://gist.github.com/2662770

Thanks!

mjallday
  • 9,796
  • 9
  • 51
  • 71
user1652737
  • 99
  • 1
  • 3

2 Answers2

2

While we're waiting on Murph to provide a working example I'll outline the process for you.

[MEGA EDIT]

Balanced now provides a quick demo site for Django. Visit django-balanced on Github to learn how to integrate Balanced and Django.

jgiles
  • 721
  • 8
  • 13
mjallday
  • 9,796
  • 9
  • 51
  • 71
1

I'm in the midst of doing it. Right now, the form is submitted to balanced via JQuery, and returns a callback, and the uri from the callback is posted with JQuery to a Django view (with no template). That view saves the uri to the database related to a transaction/user, performs some test charges, and then sends the user on to a view with a template and such.

Once I have mine completely working I'll post some example code!

Murph
  • 511
  • 7
  • 16