Created
July 14, 2021 06:45
-
-
Save skylying/877a703b29c78a37311d4206c6f47004 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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