mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-04 00:50:18 +00:00
Gocardless integration (#13008)
* GoCardless integration * Addition of a method for determining if the email should be sent or not * Correction for Tests * Codacy fix * Documents moved to ERPNext * Codacy fix * Codacy fixes * Remove method where not necessary and replace with hasattr
This commit is contained in:
committed by
Rushabh Mehta
parent
3fecbb98c5
commit
bc7a549fdb
@@ -0,0 +1,24 @@
|
||||
$(document).ready(function() {
|
||||
var data = {{ frappe.form_dict | json }};
|
||||
var doctype = "{{ reference_doctype }}"
|
||||
var docname = "{{ reference_docname }}"
|
||||
|
||||
frappe.call({
|
||||
method: "erpnext.templates.pages.integrations.gocardless_checkout.check_mandate",
|
||||
freeze: true,
|
||||
headers: {
|
||||
"X-Requested-With": "XMLHttpRequest"
|
||||
},
|
||||
args: {
|
||||
"data": JSON.stringify(data),
|
||||
"reference_doctype": doctype,
|
||||
"reference_docname": docname
|
||||
},
|
||||
callback: function(r) {
|
||||
if (r.message) {
|
||||
window.location.href = r.message.redirect_to
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
@@ -0,0 +1,24 @@
|
||||
$(document).ready(function() {
|
||||
var redirect_flow_id = "{{ redirect_flow_id }}";
|
||||
var doctype = "{{ reference_doctype }}";
|
||||
var docname = "{{ reference_docname }}";
|
||||
|
||||
frappe.call({
|
||||
method: "erpnext.templates.pages.integrations.gocardless_confirmation.confirm_payment",
|
||||
freeze: true,
|
||||
headers: {
|
||||
"X-Requested-With": "XMLHttpRequest"
|
||||
},
|
||||
args: {
|
||||
"redirect_flow_id": redirect_flow_id,
|
||||
"reference_doctype": doctype,
|
||||
"reference_docname": docname
|
||||
},
|
||||
callback: function(r) {
|
||||
if (r.message) {
|
||||
window.location.href = r.message.redirect_to;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user