Skip to content

Instantly share code, notes, and snippets.

@skylying
Created July 14, 2021 06:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skylying/877a703b29c78a37311d4206c6f47004 to your computer and use it in GitHub Desktop.
Save skylying/877a703b29c78a37311d4206c6f47004 to your computer and use it in GitHub Desktop.
getAddAgreement: function() {
totalAgreements([]);
fullScreenLoader.startLoader();
let serviceUrl = urlBuilder.createUrl('/paymententrance/agreements', {});
storage.post(
serviceUrl,
JSON.stringify({
'customerId': window.checkoutConfig.customerData.id,
'paymentMethod': 'recurring_paypal'
})
).done(
function(response) {
if (response) {
$.each(response, function(i, v) {
totalAgreements.push();
window.checkoutConfig.agreementId = v.agreementId;
$('.paypal-email').text(v.additionalData.paypalEmail);
});
}
fullScreenLoader.stopLoader();
}
).fail(
function(response) {
fullScreenLoader.stopLoader();
}
);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment