solidus_nexio 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +39 -1
- data/app/views/spree/checkout/payment/_nexio_apm.html.erb +7 -2
- data/lib/solidus_nexio/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: ddb0f7278645f88cf97deee0c4abb566fcdef92e9670e85599e32f876ed73ddd
         | 
| 4 | 
            +
              data.tar.gz: 83f11d368531fae0ee997dabe59ed21a305bc514aac4afda1ca22a5940c845a0
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: c46acbe66367853463ad99d5ca379b7633e7cb9b572c61088111adba1ecee13d1ff19312f88208b5d6158fee818e648d9593de1ee321eb34935aa936fa028c47
         | 
| 7 | 
            +
              data.tar.gz: ce4a0f69ee54f876c3cc1a7ce17c94e8d814e418cc8fc7e86f65b97749225463b080c55a44fbed65ac9d64db4cb7bbfed42f8062eed598dcce09ae54b56d1ba6
         | 
    
        data/README.md
    CHANGED
    
    | @@ -22,7 +22,45 @@ Or install it yourself as: | |
| 22 22 |  | 
| 23 23 | 
             
            ## Usage
         | 
| 24 24 |  | 
| 25 | 
            -
             | 
| 25 | 
            +
            This is a example of Spree config for Paragon in `config/initializers/spree.rb`
         | 
| 26 | 
            +
            ```
         | 
| 27 | 
            +
            Spree.config do |config|
         | 
| 28 | 
            +
              ...
         | 
| 29 | 
            +
             | 
| 30 | 
            +
              Rails.configuration.after_initialize do
         | 
| 31 | 
            +
                config.static_model_preferences.add(
         | 
| 32 | 
            +
                  SolidusNexio::PaymentMethod,
         | 
| 33 | 
            +
                  'nexio',
         | 
| 34 | 
            +
                  server: ENV['NEXIO_ENV'] || 'sandbox', # production || sandbox
         | 
| 35 | 
            +
                  merchant_id: ENV['NEXIO_MERCHANT_ID'],
         | 
| 36 | 
            +
                  auth_token: ENV['NEXIO_AUTH_TOKEN'],
         | 
| 37 | 
            +
                  public_key: ENV['NEXIO_PUBLIC_KEY'],
         | 
| 38 | 
            +
                  three_d_secure: ENV['NEXIO_THREE_D_SECURE'].present?
         | 
| 39 | 
            +
                )
         | 
| 40 | 
            +
             | 
| 41 | 
            +
                config.static_model_preferences.add(
         | 
| 42 | 
            +
                  SolidusNexio::AlternativePaymentMethod,
         | 
| 43 | 
            +
                  'braintree_paypal_apm',
         | 
| 44 | 
            +
                  server: ENV['NEXIO_ENV'] || 'sandbox', # production || sandbox
         | 
| 45 | 
            +
                  merchant_id: ENV['NEXIO_MERCHANT_ID'],
         | 
| 46 | 
            +
                  auth_token: ENV['NEXIO_AUTH_TOKEN'],
         | 
| 47 | 
            +
                  payment_method: 'braintreePayPal',
         | 
| 48 | 
            +
                  save_token: true
         | 
| 49 | 
            +
                )
         | 
| 50 | 
            +
                Spree::PaymentMethod
         | 
| 51 | 
            +
                config.static_model_preferences.add(
         | 
| 52 | 
            +
                  SolidusNexio::AlternativePaymentMethod,
         | 
| 53 | 
            +
                  'paypal_redirect',
         | 
| 54 | 
            +
                  server: ENV['NEXIO_ENV'] || 'sandbox', # production || sandbox
         | 
| 55 | 
            +
                  merchant_id: ENV['NEXIO_MERCHANT_ID'],
         | 
| 56 | 
            +
                  auth_token: ENV['NEXIO_AUTH_TOKEN'],
         | 
| 57 | 
            +
                  payment_method: 'payPal',
         | 
| 58 | 
            +
                  save_token: true,
         | 
| 59 | 
            +
                  customer_redirect: true
         | 
| 60 | 
            +
                )
         | 
| 61 | 
            +
              end
         | 
| 62 | 
            +
            end
         | 
| 63 | 
            +
            ```
         | 
| 26 64 |  | 
| 27 65 | 
             
            ## Frontend Development
         | 
| 28 66 |  | 
| @@ -1,12 +1,17 @@ | |
| 1 | 
            +
            <%
         | 
| 2 | 
            +
              # Set defaults for local_assigns
         | 
| 3 | 
            +
              user ||= current_spree_user
         | 
| 4 | 
            +
              order ||= current_order
         | 
| 5 | 
            +
            %>
         | 
| 1 6 | 
             
            <% if payment_method.preferred_customer_redirect %>
         | 
| 2 7 | 
             
              <%= link_to '#', class: :hidden, data: { 'nexio-customer-redirect': payment_method.id, 'nexio-payment-method': payment_method.preferred_payment_method } do %>
         | 
| 3 8 | 
             
                <%= yield.presence || payment_method.name %>
         | 
| 4 9 | 
             
              <% end %>
         | 
| 5 | 
            -
              <%= setup_custom_redirect(payment_method,  | 
| 10 | 
            +
              <%= setup_custom_redirect(payment_method, order, user: user) %>
         | 
| 6 11 | 
             
            <% else %>
         | 
| 7 12 | 
             
              <fieldset data-nexio-apm="<%= payment_method.id %>" data-hook="nexio_apm" data-nexio-payment-method="<%= payment_method.preferred_payment_method %>">
         | 
| 8 13 | 
             
                <input name="order[payments_attributes][][nexio_apm_transaction_id]" type="hidden" data-hook="nexio_apm_transaction_id" />
         | 
| 9 14 | 
             
                <input name="payment_source[<%= payment_method.id %>][gateway_payment_profile_id]" type="hidden" data-hook="gateway_payment_profile_id" />
         | 
| 10 15 | 
             
              </fieldset>
         | 
| 11 | 
            -
              <%= setup_nexio_apm(payment_method,  | 
| 16 | 
            +
              <%= setup_nexio_apm(payment_method, order, user: user) %>
         | 
| 12 17 | 
             
            <% end %>
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: solidus_nexio
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.7. | 
| 4 | 
            +
              version: 0.7.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Whitespectre
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023-04- | 
| 11 | 
            +
            date: 2023-04-03 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: nexio_activemerchant
         |