Friday 15 March 2013

javascript - Odoo: Adding Stripe with Payment Acquirer -


I am trying to integrate the strip with odu. I would like to use stripe.js, so my server does not need to store credit card numbers.

To try to understand how I can do it, I looked at open source add-ons "" "" "" Paypal URL "" If Environment == 'Prod': Returns { /}

  def _get_paypal_urls (self, cr, uid, environment, context = none) 'paypal_form_url': 'https://www.paypal.com/ Cgi-bin / webscr ',' paypal_stable_ ':' https://api.paypal.com/v1/oauth2/token ',} other: return {' paypal_form_url ':' https://www.sandbox.paypal.com / Cgi-bin / webscr ',' Paypal_Stayer ':' https://api.sandbox.paypal.com/v1/oauth2/token ',}  

Where ' paypal_form_url The ' key contains a URL that is function and & lt; Form & gt; tag on the check page.

The way the stripe JS is to be included on a webpage, it is actually ():

  & lt; Form action = "/ charge" method = "post" & gt; & Lt; Script src = "https://checkout.stripe.com/checkout.js" class = "stripe-button" data-key = "pk_test_6pRNASCoBOKtIshFeQd4XMUh" data-image = "/ img / documentation / checkout / marketplace" data-name = "Stripe dot" "Data-details =" 2 widget "Data-zodiac =" 2000 ">    

Clearly the middle of the form tag is arbitrary JavaScript, so that there is not enough to set the verb " setting to make it worth working. This is a problem because odu The template system already fills in HTML for you.

Is there a way that I can get arbitrary javascript to work with Odu's built-in payment system? Is it possible to integrate the stripe with odu Is there any other way?

I am interested in this, yesterday someone has posted it You are going to start looking towards you:

Probably, Minister-ET - may help the prefix in a template and twists, but I'm certainly not enough to know.

The way PayPal works in this scenario, it is a redirect in PayPal with a callback URL. This stripe checkout works just like the apple :: oranges .

If I used to guess, if t-AT eval + template worked, then you can wrap it with a token to make a real strip API transaction in a module If this card is valid. Whether you use Strip.JS or Stripe checkout, you just need to process the token server side.

If I understand this, then I will post something here.


No comments:

Post a Comment