davidgraeff / braintree-payment-graphql-rs Goto Github PK
View Code? Open in Web Editor NEWA Rust braintree payment client for the GraphQL API
License: MIT License
A Rust braintree payment client for the GraphQL API
License: MIT License
Describe the bug
Build braintree-queries-generators failed- nightly 1.67, feature clock_fn
To Reproduce
I build the braintree-queries-generator but got the error at lock_api crate. Clock_fn feature has been removed
rustc --version
rustc 1.67.0-nightly (c97b539e4 2022-11-30)
Expected behavior
Build should be successfully with rustc nightly >= 1.67
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.
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
).
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
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.
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.