@ -0,0 +1,25 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author:Cybrosys Technologies (<www.cybrosys.com>) |
||||
|
# you can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies |
||||
|
# of the Software or modified copies of the Software. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
|
||||
|
import models |
||||
|
import controllers |
@ -0,0 +1,43 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author: Hilar AK(<hilar@cybrosys.in>) |
||||
|
# you can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies |
||||
|
# of the Software or modified copies of the Software. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
|
||||
|
{ |
||||
|
'name': "WePay Payment Gateway", |
||||
|
'version': '9.0.1.0.0', |
||||
|
'summary': """Wepay Payment Gateway.""", |
||||
|
'description': """Payment Acquirer: Wepay""", |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'website': "http://cybrosys.com/", |
||||
|
'category': 'eCommerce', |
||||
|
'depends': ['base', 'payment', 'website_sale'], |
||||
|
'data': [ |
||||
|
'views/views.xml', |
||||
|
'views/templates.xml', |
||||
|
'data/wepay.xml', |
||||
|
], |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'license': 'LGPL-3', |
||||
|
'installable': True, |
||||
|
'application': True |
||||
|
} |
@ -0,0 +1,3 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
|
||||
|
import main |
@ -0,0 +1,117 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
import logging |
||||
|
import pprint |
||||
|
import requests |
||||
|
import werkzeug |
||||
|
import json |
||||
|
|
||||
|
from openerp import http, SUPERUSER_ID |
||||
|
from openerp.http import request |
||||
|
from openerp.addons.payment.models.payment_acquirer import ValidationError |
||||
|
|
||||
|
_logger = logging.getLogger(__name__) |
||||
|
|
||||
|
class WepayController(http.Controller): |
||||
|
|
||||
|
@http.route(['/wepay/checkout'], type='http', auth='none', csrf=None, website=True) |
||||
|
def checkout(self, **post): |
||||
|
""" |
||||
|
Function which creates the checkout iframe after clicking on PayNow Button. It requires |
||||
|
wepay account id, and access tocken to create the checkout iframe. |
||||
|
Check https://developer.wepay.com/api-calls/checkout#create for more Information. |
||||
|
redirect and the callback_uri must be a full URL and must not include localhost or wepay.com. |
||||
|
redirect_uri must be a full uri (ex http://www.example.com) if you are in production mode. |
||||
|
:param post: |
||||
|
:return: Checkout uri provided after creating checkout, response from /checkout/create |
||||
|
""" |
||||
|
_logger.info('Wepay datas %s', pprint.pformat(post)) # debug |
||||
|
cr, uid, context, env = request.cr, SUPERUSER_ID, request.context, request.env |
||||
|
acquirer = env['payment.acquirer'].sudo().browse(eval(post.get('acquirer'))) |
||||
|
currency = env['res.currency'].sudo().browse(eval(post.get('currency_id'))).name |
||||
|
if currency not in ['CAD', 'GBP', 'USD']: |
||||
|
_logger.info("Invalid parameter 'currency' expected one of: 'CAD', 'GBP', 'USD'") |
||||
|
return request.redirect('/shop/cart') |
||||
|
url = "https://stage.wepayapi.com/v2/checkout/create" if acquirer.environment == 'test'\ |
||||
|
else "https://wepayapi.com/v2/checkout/create" |
||||
|
base_url = request.env['ir.config_parameter'].get_param('web.base.url') |
||||
|
return_url = base_url + '/wepay/checkout/confirm' |
||||
|
payload = json.dumps({ |
||||
|
"account_id": int(acquirer.wepay_account_id), |
||||
|
"amount": post.get('amount') or '', |
||||
|
"type": "goods", #Possible values:, goods, service, donation, event, and personal |
||||
|
"currency": currency, |
||||
|
"short_description": "Payment From Odoo E-commerce", |
||||
|
"long_description": "Payment From Odoo E-commerce", |
||||
|
"email_message": { |
||||
|
"to_payer": "Please contact us at 555-555-555 if you need assistance.", |
||||
|
"to_payee": "Please note that we cover all shipping costs." |
||||
|
}, |
||||
|
"callback_uri": return_url,#'http://example.com', |
||||
|
"reference_id": post.get('reference'), |
||||
|
"auto_release": True, |
||||
|
"hosted_checkout": { |
||||
|
"redirect_uri": return_url, |
||||
|
"shipping_fee": 0, |
||||
|
"mode": "regular", |
||||
|
"prefill_info": { |
||||
|
"email": post.get('partner_email'), |
||||
|
"name": post.get('billing_partner_name') or post.get('partner_name'), |
||||
|
"address": { |
||||
|
"address1": post.get("billing_partner_address") or '', |
||||
|
"address2": post.get("billing_partner_address") or '', |
||||
|
"city": post.get('billing_partner_city') or '', |
||||
|
"region": post.get("billing_partner_state") or '', |
||||
|
"postal_code": post.get('billing_partner_zip') or '', |
||||
|
"country": env['res.country'].sudo().browse(eval(post.get("billing_partner_country_id"))).code or '' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}) |
||||
|
headers = { |
||||
|
'content-type': "application/json", |
||||
|
'authorization': "Bearer %s" % acquirer.wepay_access_tocken.replace(" ", ""), |
||||
|
'cache-control': "no-cache", |
||||
|
} |
||||
|
response = requests.request("POST", url, data=payload, headers=headers) |
||||
|
vals = json.loads(response.text) |
||||
|
_logger.info(pprint.pformat(vals)) |
||||
|
return werkzeug.utils.redirect(vals.get('hosted_checkout')['checkout_uri']) |
||||
|
|
||||
|
@http.route(['/wepay/checkout/confirm'], type='http', auth='none', csrf=None, website=True) |
||||
|
def checkout_confirm(self, **post): |
||||
|
""" |
||||
|
route which serves when a transaction is completed by wepay through checkout iframe, which we defines the |
||||
|
return uri while creating wepay checkout. ie, redirect_uri in hosted_checkout dict. |
||||
|
released,authorized are the successfull transactions and cancelled,falled are the error responses. |
||||
|
:param post: |
||||
|
:return: /shop/payment/validate if success else /shop |
||||
|
""" |
||||
|
cr, uid, context, env = request.cr, SUPERUSER_ID, request.context, request.env |
||||
|
acquirer = env['payment.acquirer'].sudo().search([('provider', '=', 'wepay')]) |
||||
|
url = "https://stage.wepayapi.com/v2/checkout/" if acquirer and acquirer.environment == 'test' \ |
||||
|
else "https://wepayapi.com/v2/checkout/" |
||||
|
headers = { |
||||
|
'content-type': "application/json", |
||||
|
'authorization': "Bearer %s" % acquirer.wepay_access_tocken.replace(" ", ""), |
||||
|
'cache-control': "no-cache", |
||||
|
} |
||||
|
tx = request.website.sale_get_transaction() |
||||
|
tx.sudo().wepay_checkout_id = post.get('checkout_id') |
||||
|
response = requests.request("POST", url, data=json.dumps(post), headers=headers) |
||||
|
vals = json.loads(response.text) |
||||
|
_logger.info(pprint.pformat(vals)) |
||||
|
if vals.get('state') == 'authorized': |
||||
|
tx.state = 'done' |
||||
|
tx.wepay_checkout_id = vals.get('checkout_id') |
||||
|
tx.sale_order_id.with_context(dict(context, send_email=True)).action_confirm() |
||||
|
return request.redirect('/shop/payment/validate') |
||||
|
elif vals.get('state') in ['cancelled', 'falled']: |
||||
|
tx.state = 'error' |
||||
|
return request.redirect('/shop') |
||||
|
elif vals.get('state') in ['released']: |
||||
|
tx.state = 'pending' |
||||
|
tx.wepay_checkout_id = vals.get('checkout_id') |
||||
|
tx.sale_order_id.with_context(dict(context, send_email=True)).action_confirm() |
||||
|
return request.redirect('/shop/payment/validate') |
||||
|
|
||||
|
|
@ -0,0 +1,18 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<openerp> |
||||
|
<data noupdate="1"> |
||||
|
<record id="payment_wepay_acquirer" model="payment.acquirer"> |
||||
|
<field name="name">WePay</field> |
||||
|
<field name="image" type="base64" file="payment_wepay_gateway/static/description/icon.png"/> |
||||
|
<field name="provider">wepay</field> |
||||
|
<field name="company_id" ref="base.main_company"/> |
||||
|
<field name="view_template_id" ref="wepay_button"/> |
||||
|
<field name="environment">test</field> |
||||
|
<field name="pre_msg"><![CDATA[ |
||||
|
<p>You will be redirected to the Wepay payment window after clicking on the payment button.</p>]]></field> |
||||
|
<field name="wepay_merchant_id">dummy</field> |
||||
|
<field name="wepay_account_id">dummy</field> |
||||
|
<field name="wepay_access_tocken">dummy</field> |
||||
|
</record> |
||||
|
</data> |
||||
|
</openerp> |
@ -0,0 +1,24 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author:Cybrosys Technologies (<www.cybrosys.com>) |
||||
|
# you can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies |
||||
|
# of the Software or modified copies of the Software. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
|
||||
|
import models |
@ -0,0 +1,45 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################## |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# Copyright (C) 2017-TODAY Cybrosys Technologies(<http://www.cybrosys.com>). |
||||
|
# Author:Cybrosys Technologies (<www.cybrosys.com>) |
||||
|
# you can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# It is forbidden to publish, distribute, sublicense, or sell copies |
||||
|
# of the Software or modified copies of the Software. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
|
||||
|
import logging |
||||
|
from openerp import models, fields, _ |
||||
|
|
||||
|
_logger = logging.getLogger(__name__) |
||||
|
|
||||
|
|
||||
|
class Wepay(models.Model): |
||||
|
_inherit = 'payment.acquirer' |
||||
|
|
||||
|
def _get_providers(self, cr, uid, context=None): |
||||
|
providers = super(Wepay, self)._get_providers(cr, uid, context=context) |
||||
|
providers.append(['wepay', 'WePay']) |
||||
|
return providers |
||||
|
wepay_merchant_id = fields.Char("Client Id") |
||||
|
wepay_account_id = fields.Char("Account Id") |
||||
|
wepay_access_tocken = fields.Char("Access Token") |
||||
|
|
||||
|
|
||||
|
class WepayTransaction(models.Model): |
||||
|
_inherit = "payment.transaction" |
||||
|
wepay_checkout_id = fields.Char("Wepay Checkout Id") |
||||
|
acquirer_name = fields.Selection(related='acquirer_id.provider') |
@ -0,0 +1,45 @@ |
|||||
|
# Wepay Payment Gateway |
||||
|
|
||||
|
Wepay Payment Acquirer act as a new payment method in odoo e-commerce and easy checkout functionality with two steps. |
||||
|
|
||||
|
- We have two modes test & production |
||||
|
- Test Url - https://stage.wepay.com/ |
||||
|
- Production mode - https://www.wepay.com/ |
||||
|
- Follow here to create test account https://stage.wepay.com/register/ |
||||
|
- Follow here to create Production account https://www.wepay.com/register/ |
||||
|
|
||||
|
- expected one of currencies 'CAD', 'GBP', 'USD' |
||||
|
|
||||
|
### Depends |
||||
|
Ecommerce, Website, Payment modules in odoo |
||||
|
|
||||
|
### Tech |
||||
|
* [Python] - Models,Controllers |
||||
|
* [XML] - Odoo website templates, views |
||||
|
|
||||
|
### Installation |
||||
|
- www.odoo.com/documentation/9.0/setup/install.html |
||||
|
- Install our custom addon, which also installs its depends [website, website_sale, payment] |
||||
|
|
||||
|
### Usage |
||||
|
> Provide Wepay test or active account credentials. |
||||
|
> Account id, access_tocken, client id will be get after creating a client account on wepay. |
||||
|
> Follow https://support.wepay.com/hc/en-us/articles/203609673-How-do-I-set-up-my-WePay-account- for account creation. |
||||
|
> Wepay Support https://support.wepay.com/hc/en-us/articles/203609503-WePay-FAQ |
||||
|
> Publish wepay acquirer for odoo e-commerce. |
||||
|
> redirect and the callback_uri must be a full URL and must not include localhost or wepay.com. |
||||
|
|
||||
|
### References |
||||
|
https://developer.wepay.com/ |
||||
|
https://www.wepay.com/developer |
||||
|
https://www.wepay.com/developer/register |
||||
|
https://stage-go.wepay.com/ |
||||
|
https://go.wepay.com/ |
||||
|
|
||||
|
License |
||||
|
---- |
||||
|
GNU LESSER GENERAL PUBLIC LICENSE, Version 3 (LGPLv3) |
||||
|
(http://www.gnu.org/licenses/agpl.html) |
||||
|
|
||||
|
|
||||
|
|
|
After Width: | Height: | Size: 95 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 15 KiB |
@ -0,0 +1,159 @@ |
|||||
|
<section class="oe_container oe_dark"> |
||||
|
<h2 class="oe_slogan" style="margin-top:20px;" >Wepay Payment Gateway</h2> |
||||
|
<h4 class="oe_slogan" style="font-size: 23px;">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container"> |
||||
|
<div class="oe_container"> |
||||
|
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
||||
|
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
||||
|
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
||||
|
<h2 class=" mt32 mb16"><b>Expected one of currencies 'CAD', 'GBP', 'USD'</b></h2> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_container oe_dark"> |
||||
|
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
||||
|
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
||||
|
|
||||
|
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
||||
|
<h2 class=" mt32 mb16"><b>Wepay Account Dashboard</b></h2> |
||||
|
</div> |
||||
|
<div class="col-md-6" style="transition-delay: 500ms;"> |
||||
|
<div class=" oe_demo oe_picture oe_screenshot"> |
||||
|
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
||||
|
src="apidashboard.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_container"> |
||||
|
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
||||
|
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
||||
|
|
||||
|
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
||||
|
<h2 class=" mt32 mb16"><b>Configure Wepay backend and Provide specified credentials</b></h2> |
||||
|
|
||||
|
</div> |
||||
|
<div class="col-md-6" style="transition-delay: 500ms;"> |
||||
|
<div class=" oe_demo oe_picture oe_screenshot"> |
||||
|
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
||||
|
src="wepaybackend.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_container"> |
||||
|
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
||||
|
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
||||
|
|
||||
|
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
||||
|
<h2 class=" mt32 mb16"><b>Checkout Form and Wepay Payment Method</b></h2> |
||||
|
|
||||
|
</div> |
||||
|
<div class="col-md-6" style="transition-delay: 500ms;"> |
||||
|
<div class=" oe_demo oe_picture oe_screenshot"> |
||||
|
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
||||
|
src="paymentshop.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_container"> |
||||
|
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
||||
|
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
||||
|
|
||||
|
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
||||
|
<h2 class=" mt32 mb16"><b>Wepay Checkout Iframe</b></h2> |
||||
|
|
||||
|
</div> |
||||
|
<div class="col-md-6" style="transition-delay: 500ms;"> |
||||
|
<div class=" oe_demo oe_picture oe_screenshot"> |
||||
|
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
||||
|
src="checkoutiframe.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_container"> |
||||
|
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
||||
|
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
||||
|
|
||||
|
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
||||
|
<h2 class=" mt32 mb16"><b>Confirm Wepay Checkout</b></h2> |
||||
|
|
||||
|
</div> |
||||
|
<div class="col-md-6" style="transition-delay: 500ms;"> |
||||
|
<div class=" oe_demo oe_picture oe_screenshot"> |
||||
|
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
||||
|
src="checkoutconfirm.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_container"> |
||||
|
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
||||
|
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
||||
|
|
||||
|
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
||||
|
<h2 class=" mt32 mb16"><b>Sale order status after successfull Payment</b></h2> |
||||
|
|
||||
|
</div> |
||||
|
<div class="col-md-6" style="transition-delay: 500ms;"> |
||||
|
<div class=" oe_demo oe_picture oe_screenshot"> |
||||
|
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
||||
|
src="shopconfirm.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="oe_container"> |
||||
|
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
||||
|
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
||||
|
|
||||
|
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
||||
|
<h2 class=" mt32 mb16"><b>Payment Transaction and Wepay checkout Id</b></h2> |
||||
|
|
||||
|
</div> |
||||
|
<div class="col-md-6" style="transition-delay: 500ms;"> |
||||
|
<div class=" oe_demo oe_picture oe_screenshot"> |
||||
|
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
||||
|
src="transaction.png"> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
||||
|
|
||||
|
<section class="oe_container oe_dark"> |
||||
|
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
||||
|
<div class="oe_slogan" style="margin-top:10px !important;"> |
||||
|
<div> |
||||
|
<a class="btn btn-primary btn-lg mt8" |
||||
|
style="color: #FFFFFF !important;border-radius: 0;" href="http://www.cybrosys.com"><i |
||||
|
class="fa fa-envelope"></i> Email </a> <a |
||||
|
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
||||
|
href="http://www.cybrosys.com/contact/"><i |
||||
|
class="fa fa-phone"></i> Contact Us </a> <a |
||||
|
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
||||
|
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i |
||||
|
class="fa fa-check-square"></i> Request Customization </a> |
||||
|
</div> |
||||
|
<br> |
||||
|
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
||||
|
<div> |
||||
|
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
||||
|
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
||||
|
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
||||
|
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
||||
|
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
||||
|
</div> |
||||
|
</div> |
||||
|
</section> |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 228 KiB |
After Width: | Height: | Size: 205 KiB |
After Width: | Height: | Size: 243 KiB |
After Width: | Height: | Size: 54 KiB |
@ -0,0 +1,29 @@ |
|||||
|
<openerp> |
||||
|
<data> |
||||
|
<template id="wepay_button" name="Wepay Payment Button"> |
||||
|
<form t-if="acquirer.wepay_account_id and acquirer.wepay_merchant_id" action="/wepay/checkout" method="post" target="_self"> |
||||
|
<input type="hidden" name="acquirer" t-att-value="acquirer.id"/> |
||||
|
<input type="hidden" name="partner_name" t-att-value="partner_name"/> |
||||
|
<input type="hidden" name="reference" t-att-value="reference"/> |
||||
|
<input type="hidden" name="billing_partner_id" t-att-value="billing_partner_id"/> |
||||
|
<input type="hidden" name="billing_partner_name" t-att-value="billing_partner_name"/> |
||||
|
<input type="hidden" name="billing_partner_last_name" t-att-value="billing_partner_last_name"/> |
||||
|
<input type="hidden" name="billing_partner_address" t-att-value="billing_partner_address"/> |
||||
|
<input type="hidden" name="billing_partner_zip" t-att-value="billing_partner_zip"/> |
||||
|
<input type="hidden" name="street" t-att-value="street"/> |
||||
|
<input type="hidden" name="street2" t-att-value="street2"/> |
||||
|
<input type="hidden" name="currency_id" t-att-value="currency_id"/> |
||||
|
<input type="hidden" name="billing_partner_country_id" t-att-value="billing_partner_country_id"/> |
||||
|
<input type="hidden" name="billing_partner_city" t-att-value="billing_partner_city"/> |
||||
|
<input type="hidden" name="custom" t-att-value="custom"/> |
||||
|
<input type="hidden" name="partner_email" t-att-value="partner_email"/> |
||||
|
<input type="hidden" name="amount" t-att-value="amount"/> |
||||
|
<button type="submit" width="100px" |
||||
|
t-att-class="submit_class"> |
||||
|
<img t-if="not submit_txt" src="/payment_wepay_gateway/static/description/icon.png"/> |
||||
|
<span t-if="submit_txt"><t t-esc="submit_txt"/> <span class="fa fa-long-arrow-right"/></span> |
||||
|
</button> |
||||
|
</form> |
||||
|
</template> |
||||
|
</data> |
||||
|
</openerp> |
@ -0,0 +1,37 @@ |
|||||
|
<openerp> |
||||
|
<data> |
||||
|
<record id="acquirer_form_wepay" model="ir.ui.view"> |
||||
|
<field name="name">Wepay Acquirer Form</field> |
||||
|
<field name="model">payment.acquirer</field> |
||||
|
<field name="inherit_id" ref="payment.acquirer_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr='//group[@name="acquirer"]' position='after'> |
||||
|
<group attrs="{'invisible': [('provider', '!=', 'wepay')]}"> |
||||
|
<field name="wepay_account_id"/> |
||||
|
<field name="wepay_merchant_id"/> |
||||
|
<field name="wepay_access_tocken" password="1"/> |
||||
|
<a colspan="2" href="https://support.wepay.com/hc/en-us/articles/203609673-How-do-I-set-up-my-WePay-account-" |
||||
|
target="_blank">How to configure your Wepay account?</a> |
||||
|
<a colspan="2" href="https://support.wepay.com/hc/en-us/articles/203609503-WePay-FAQ" |
||||
|
target="_blank">For more support</a> |
||||
|
|
||||
|
</group> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
<record id="transaction_form_extend" model="ir.ui.view"> |
||||
|
<field name="name">Payment Transaction View Extend</field> |
||||
|
<field name="model">payment.transaction</field> |
||||
|
<field name="inherit_id" ref="payment.transaction_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<field name="reference" position="after"> |
||||
|
<field name="acquirer_name" invisible="1"/> |
||||
|
<field name="wepay_checkout_id" string="Wepay Checkout Id" |
||||
|
attrs="{'invisible': [('acquirer_name', '!=', 'wepay')]}"/> |
||||
|
</field> |
||||
|
|
||||
|
</field> |
||||
|
|
||||
|
</record> |
||||
|
</data> |
||||
|
</openerp> |