anurag / stripe-scala Goto Github PK
View Code? Open in Web Editor NEWStripe Scala Library
Home Page: https://stripe.com
License: MIT License
Stripe Scala Library
Home Page: https://stripe.com
License: MIT License
As this doesn't build in my current SBT with 2.9.1-1
I think that the current usage of Apache HttpClient is not compatible with Google AppEngine, resulting in the error below. Details of how to make client compatible is described at:
http://code.google.com/p/googleappengine/wiki/WillItPlayInJava
The cleanest approach may be to use the cake pattern to allow changing the default http client. Another approach may be to define a provider, defaulting to the current implementation, that can set. Either would allow the client to swap out the client and provide one configured to work in their environment.
java.lang.NoClassDefFoundError: Could not initialize class com.google.apphosting.runtime.security.shared.stub.javax.net.ssl.KeyManagerFactory
at org.apache.http.conn.ssl.SSLSocketFactory.createSSLContext(SSLSocketFactory.java:221)
at org.apache.http.conn.ssl.SSLSocketFactory.createDefaultSSLContext(SSLSocketFactory.java:359)
at org.apache.http.conn.ssl.SSLSocketFactory.getSocketFactory(SSLSocketFactory.java:173)
at org.apache.http.impl.conn.SchemeRegistryFactory.createDefault(SchemeRegistryFactory.java:49)
at org.apache.http.impl.client.AbstractHttpClient.createClientConnectionManager(AbstractHttpClient.java:305)
at org.apache.http.impl.client.AbstractHttpClient.getConnectionManager(AbstractHttpClient.java:467)
at com.stripe.APIResource.rawRequest(Stripe.scala:120)
at com.stripe.APIResource.request(Stripe.scala:125)
at com.stripe.Customer$.create(Stripe.scala:242)
When trimming down my GAE war, I was surprised to see scalatest_2.9.1-1.6.1.jar in the libs. By running "mvn dependency:tree" I tracked it to this project (see below) and verified in your build file. This is a 2.6mb jar, which increases the load time of a GAE instance.
[INFO] +- com.stripe:stripe-scala_2.9.1:jar:1.0.3:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.1:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.1.2:compile
[INFO] | | +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | | - commons-codec:commons-codec:jar:1.4:compile
[INFO] | +- net.liftweb:lift-json_2.9.1:jar:2.4-M4:compile
[INFO] | | +- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
[INFO] | | - org.scala-lang:scalap:jar:2.9.1:compile
[INFO] | - org.scalatest:scalatest_2.9.1:jar:1.6.1:compile
With all of our other bindings, we've switched from using HTTP basic auth to using bearer auth, which is specified by the OAuth spec.
Basically, instead of setting the header
Authorization: Basic base64(APIKEY + ":")
you set
Authorization: Bearer APIKEY
Should catch up scala to the other bindings.
Charge objects in the Stripe API now have a dispute object instead of the disputed boolean:
https://groups.google.com/a/lists.stripe.com/forum/#!topic/api-discuss/dR3MCRKOtsc
The bindings need to be updated accordingly.
Maven (v3.0.3) does not appear to support Ivy's plus notation for selecting the latest version of a library after a start version. The range notation, e.g. [1.0,), is supported. This causes a Maven build to fail when including the library unless excludes are specified.
[ERROR] Failed to execute goal on project: Could not resolve dependencies for project: The following artifacts could not
be resolved: org.apache.httpcomponents:httpclient:jar:4.1.+, net.liftweb:lift-json_2.9.1:jar:2.+: Could not find artifact org.apache.httpcomponents:httpclient:jar:4.1.+ in scala-tools.org (http://scala-tools.org/repo-releases)
Can you publish a Scala 2.10.0-RC1 artifact?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.