Sha256: f56a497fae29721239785cbde6aeaeebbb0a06d2ae6376c416919a1d28bef2b2
Contents?: true
Size: 995 Bytes
Versions: 8
Compression:
Stored size: 995 Bytes
Contents
# frozen_string_literal: true require 'securerandom' module SolidusPaypalCommercePlatform class Wizard def name I18n.t('start_paying_with_paypal') end def partial_name '/solidus_paypal_commerce_platform/admin/payment_methods/paypal_wizard' end def button_url parameters = { product: "addipmt", partnerId: SolidusPaypalCommercePlatform.config.partner_id, partnerClientId: SolidusPaypalCommercePlatform.config.partner_client_id, features: "PAYMENT,REFUND", partnerLogoUrl: logo, integrationType: "FO", displayMode: "minibrowser", sellerNonce: nonce, } URI("https://#{SolidusPaypalCommercePlatform.config.env_domain}/bizsignup/partner/entry?#{parameters.to_query}") end def nonce @nonce ||= SecureRandom.alphanumeric(128) end private def logo ActionController::Base.helpers.image_url(::Spree::Config[:admin_interface_logo]) end end end
Version data entries
8 entries across 8 versions & 1 rubygems