Sha256: 6b200191d70d2ac6c14c7c861e577d87210aa435ebf722d0cf2e443b2bc92d22
Contents?: true
Size: 809 Bytes
Versions: 20
Compression:
Stored size: 809 Bytes
Contents
/* global Spree, SolidusPaypalCommercePlatform */ // This needs to be filled before using the callback SolidusPaypalCommercePlatform.nonce = null // Returning from the setup wizard SolidusPaypalCommercePlatform.onboardCallback = function(authCode, sharedId) { var nonce = SolidusPaypalCommercePlatform.nonce if (!nonce) throw new Error("Please set SolidusPaypalCommercePlatform.nonce before calling this function.") Spree.ajax({ url: '/solidus_paypal_commerce_platform/wizard', type: 'POST', data: { authCode: authCode, sharedId: sharedId, nonce: nonce }, success: function(response) { window.location.href = response.redirectUrl; }, error: function(response) { alert("Something went wrong!") } }); };
Version data entries
20 entries across 20 versions & 1 rubygems