Giter Site home page Giter Site logo

spree-protx3ds-gateway's Introduction

Protx3ds Gateway

See my fork of spree-demo to see this extension properly configured and in use. It's at http://github.com/paulcc/spree-demo/tree

Things to watch

WARNING: resubmitting an order after the 1st step of auth causes rejection because protx requires a unique VTX.I've got a crude hack to add a 4-digit time value to the end of an order number, but we should do better here.

NOTE: callback_3dsecure is exempt from protect_from_forgery - something is going wrong with the auth_token for this stage of the process (this should be investigated)

Configuration

If you use my initializer code below, then you need to put your vendor name in the file +which_vendor+. This is the name that identifies your protx main account (not the sub-account).

This mechanism is only done to hide the names of my test accounts, so you can to replace that File read with a string in your own sites etc

Using this extension

I used the following code in an initializer...

# put in test mode
Spree::Gateway::Config.set(:use_bogus => false)
ActiveMerchant::Billing::Base.gateway_mode = :test
# ActiveMerchant::Billing::Protx3dsGateway.simulate = true

# force this on, to avoid having to fix url protocols etc
Spree::Config.set(:allow_ssl_in_development_and_test => true)

# setup protx / sagepay
gw = Gateway.find_by_name("Protx3ds")


if gw.nil? 
  puts "WARNING: protx gateway configuration lost."
else
  puts " *** setting the unique gateway to Protx3ds *** "
  GatewayConfiguration.destroy_all
  gc = GatewayConfiguration.create :gateway => gw
  go = GatewayOption.find_by_gateway_id_and_name(gc.gateway.id, "login")
  gp = GatewayOptionValue.create :gateway_configuration => gc,
                                 :gateway_option => go,
                                 :value => File.read("which_vendor").chomp
end

Issues / TODO

  1. Check handling of new Maestro type - AM doesn't handle it yet (and the regexps aren't up to date)

spree-protx3ds-gateway's People

Contributors

paulcc avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.