Giter Site home page Giter Site logo

killbill-adyen-demo's Introduction

Kill Bill Adyen demo

Inspired from the Adyen Drop-In implementation.

Prerequisites

Set up

  1. Obtain Adyen credentials as explained here and set the corresponding values in the application.properties file.
  2. Obtain a client key as explained here and set it in the application.properties file.
  3. Add the demo URL (http://localhost:8084/) as an allowed origin in Adyen as explained here.

Run

To run the app:

mvn spring-boot:run

Test

  1. Go to http://localhost:8084/.
  2. Enter amount as 20 and click Checkout: Screen 1
  3. Enter the following card details and click Pay (See Adyen Test Card Numbers):
  • Card Number: 5100 0600 0000 0002
  • Expiry Date: 12/29
  • CVV: 737
  • Name on card: John Doe Screen 2
  1. This should display a successful payment page: Screen 3

Credits

Code originally developed by Wovenware.

killbill-adyen-demo's People

Contributors

pierre avatar reshmabidikar avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

killbill-adyen-demo's Issues

How to get ENCRYPTION_TOKEN

When I try to execute app.r, I don´t know how to get ENCRYPTION_TOKEN.

Furthermore, when I run application, I get next error:

2019-10-01 03:26:30 - KillBillClient::API::BadRequest - {"className":"java.lang.NullPointerException","code":null,"message":null,"causeClassName":null,"causeMessage":null,"stackTrace":[]}:
/home/fermax/.gem/gems/killbill-client-3.0.0/lib/killbill_client/api/net_http_adapter.rb:225:in request' /home/fermax/.gem/gems/killbill-client-3.0.0/lib/killbill_client/api/api.rb:49:in post'
/home/fermax/.gem/gems/killbill-client-3.0.0/lib/killbill_client/models/resource.rb:48:in post' /home/fermax/.gem/gems/killbill-client-3.0.0/lib/killbill_client/models/hosted_payment_page.rb:12:in build_form_descriptor'
app.rb:82:in directory_lookup' app.rb:175:in block in

'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1635:in call' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1635:in block in compile!'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:987:in block (3 levels) in route!' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1006:in route_eval'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:987:in block (2 levels) in route!' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1035:in block in process_route'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1033:in catch' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1033:in process_route'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:985:in block in route!' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:984:in each'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:984:in route!' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1097:in block in dispatch!'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1071:in block in invoke' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1071:in catch'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1071:in invoke' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1094:in dispatch!'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:919:in block in call!' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1071:in block in invoke'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1071:in catch' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1071:in invoke'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:919:in call!' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:908:in call'
/home/fermax/.gem/gems/rack-protection-2.0.7/lib/rack/protection/xss_header.rb:18:in call' /home/fermax/.gem/gems/rack-protection-2.0.7/lib/rack/protection/path_traversal.rb:16:in call'
/home/fermax/.gem/gems/rack-protection-2.0.7/lib/rack/protection/json_csrf.rb:26:in call' /home/fermax/.gem/gems/rack-protection-2.0.7/lib/rack/protection/base.rb:50:in call'
/home/fermax/.gem/gems/rack-protection-2.0.7/lib/rack/protection/base.rb:50:in call' /home/fermax/.gem/gems/rack-protection-2.0.7/lib/rack/protection/frame_options.rb:31:in call'
/home/fermax/.gem/gems/rack-2.0.7/lib/rack/logger.rb:15:in call' /home/fermax/.gem/gems/rack-2.0.7/lib/rack/common_logger.rb:33:in call'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:231:in call' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:224:in call'
/home/fermax/.gem/gems/rack-2.0.7/lib/rack/head.rb:12:in call' /home/fermax/.gem/gems/rack-2.0.7/lib/rack/method_override.rb:22:in call'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/show_exceptions.rb:22:in call' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:194:in call'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1950:in call' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1502:in block in call'
/home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1729:in synchronize' /home/fermax/.gem/gems/sinatra-2.0.7/lib/sinatra/base.rb:1502:in call'
/home/fermax/.gem/gems/rack-2.0.7/lib/rack/handler/webrick.rb:86:in service' /snap/ruby/151/lib/ruby/2.6.0/webrick/httpserver.rb:140:in service'
/snap/ruby/151/lib/ruby/2.6.0/webrick/httpserver.rb:96:in run' /snap/ruby/151/lib/ruby/2.6.0/webrick/server.rb:307:in block in start_thread'
127.0.0.1 - - [01/Oct/2019:03:26:29 PDT] "GET / HTTP/1.1" 500 144789

Error when executing app.rb

There´s an error when executing the App.RB at the point we call "hpp.build_form_descriptor(account.account_id, nil, user, reason, comment, options)"

Please, can you help us to move on?

KillBillClient::API::BadRequest at /
{"className":"java.lang.NullPointerException","code":null,"message":null,"causeClassName":null,"causeMessage":null,"stackTrace":[]}
file: net_http_adapter.rb location: request line: 225
BACKTRACE
(expand)

JUMP TO: GET POST COOKIES ENV
app.rb in directory_lookup
descriptor = hpp.build_form_descriptor(account.account_id, nil, user, reason, comment, options)
app.rb in block in


@Directory = directory_lookup(@account, user, reason, comment, options)
GET
No GET data.

POST
No POST data.

COOKIES

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.