Coder Social home page Coder Social logo

braintree-payment-graphql-rs's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

travismiller

braintree-payment-graphql-rs's Issues

Please make the fields of the Credential struct public

Currently the fields are private, and the only way to load the credentials is from a JSON file. I however store all the credentials in a .env file with a different format. If the fields were public, I could initialize my Braintree credentials from the config, however right now I'd have to format them as JSON, then pass them back into the Credentials::new function.

Just making the fields public would fix the issue and also provide better support for custom config serialization / deserialization.

braintree-queries-generator build fails

First off, thank you @davidgraeff for this crate. It is fantastic! ๐Ÿ™Œ

I've run into an issue with generating queries and I'm leaving my notes for whomever it may help.


Describe the bug
Build fails for the braintree-queries-generator crate.

To Reproduce
Steps to reproduce the behavior:

$ git clone [email protected]:davidgraeff/braintree-payment-graphql-rs.git
$ cd braintree-payment-graphql-rs/braintree-queries-generator

$ rustc --version
rustc 1.41.0-nightly (412f43ac5 2019-11-24)

$ cargo build
   Compiling crossbeam-channel v0.3.9
   Compiling structopt v0.3.5
   Compiling rustc_version v0.2.3
   Compiling graphql-parser v0.2.3
   Compiling rust_decimal v1.0.3
   Compiling cookie_store v0.7.0
   Compiling cargo_metadata v0.8.2
error[E0432]: unresolved import `crossbeam_utils::atomic`
 --> /Users/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-channel-0.3.9/src/flavors/tick.rs:8:22
  |
8 | use crossbeam_utils::atomic::AtomicCell;
  |                      ^^^^^^ could not find `atomic` in `crossbeam_utils`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `crossbeam-channel`.
warning: build failed, waiting for other jobs to finish...
error: build failed

Expected behavior
The braintree-queries-generator should build on +nightly (or ideally +stable).

Work-around

The error comes from crossbeam_utils and the rustfmt-nightly feature seems to be all that requires nightly.

Here I'm using +stable without the rustfmt-nightly feature to build and install the binary. This produces Rust code which is not easily readable but can be re-formatted externally with rustfmt.

$ git clone [email protected]:davidgraeff/braintree-payment-graphql-rs.git
$ braintree-payment-graphql-rs/braintree-queries-generator
$ cargo +stable install --no-default-features --path . --force

Here's a Makefile target I'm using to generate queries and re-format the generated rust code.

.PHONY: src/queries
src/queries:
	~/.cargo/bin/braintree-queries-generator
	rustfmt src/queries/*
	sed -i.bak 's/graphql_client::GraphQLQueryCLI/braintreepayment_graphql::GraphQLQueryCLI/g' src/queries/*
	rm src/queries/*.bak

Noteworthy external issues

implement payment methods

Hello, I am new to this, it seems that when making a transaction, input parameters such as the "nonce" and the "payment_method_id" are missing, it is not clear.

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.