Giter Club home page Giter Club logo

wirecard_checkout_page's Introduction

WirecardCheckoutPage

Example usage

Gateway setup

gateway = WirecardCheckoutPage::Gateway.new(
  customer_id: 'D200001',
  secret:      'B8AKTPWBRMNBV455FG6M2DANE99WU2',
)

Init a new payment process

params = {
  amount:           '100.00',
  cancelUrl:        'https://foo.com/cancel',
  confirmUrl:       'https://foo.com/confirm',
  currency:         'EUR',
  failureUrl:       'https://foo.com/failure',
  language:         'en',
  orderDescription: 'order',
  orderReference:   '123',
  paymentType:      'SELECT',
  serviceUrl:       'https://foo.com/service',
  successUrl:       'https://foo.com/success',
}

response = gateway.init(params)

puts response.success?
#=> true

puts response.params
#=> { payment_url: 'http://example.com/redirect_your_user_to_here' }

Badges

Code Climate

Test Coverage

TODOS

[] Document the toolkit features

wirecard_checkout_page's People

Contributors

flori avatar xijo avatar

Stargazers

René Koller avatar

Watchers

James Cloos avatar  avatar

wirecard_checkout_page's Issues

response.success? returns true even though it is not.

When i use shop_id as a parameter to initialise the gateway, i get a failure url in response params.

For example --> https://checkout.wirecard.com/page/D2004113D_DESKTOP/failureintermediate.php

Can it be that I am creating the gateway in a wrong way?

If i don't use the shop_id and use demo values instead, it works correctly.

With the latest version bump, I get an error if I pass "fingerprint_keys" key in the params too.

params = {
       fingerprint_keys: [
         'secret',
         'customerId',
         'shopId',
         'currency',
         'language',
         'paymentType',
         'orderDescription',
         'amount',
         'successURL',
         'cancelURL',
         'failureURL',
         'serviceURL',
         'confirmURL',
         'orderReference',
         'requestFingerprintOrder'
       ],
      currency:         'EUR',
      language:         'en',
      paymentType:       'CCARD',
      ....
response = gateway.init(params)
NoMethodError: undefined method `fingerprint_keys=' for #<WirecardCheckoutPage::InitRequest:0x007ff61b89d7f8>
    from lib/ruby/gems/2.1.0/gems/wirecard_checkout_page-0.1.0/lib/wirecard_checkout_page/request.rb:20:in `block in initialize'

Can you give an example setup how to initialise the gem in correct way?

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.