-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python Flask/Ruby Sinatra examples #160
Python Flask/Ruby Sinatra examples #160
Conversation
gem "dotenv", "~> 3.1" | ||
gem "paypal-server-sdk", "~> 0.5.1" | ||
gem "puma", "~> 6.4" | ||
gem "rackup", "~> 2.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove rackup and puma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, these are required by Sinatra.
), | ||
'prefer' => 'return=representation' | ||
}) | ||
order_response.data.to_json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LeonarthusMectus can you return this response as json, similar to Line 34. By default text/html;charset=utf-8
will be return instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amsourav Good catch, fixed this up in both standard & advanced integrations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LeonarthusMectus - Can we remove .env usage and stick to Environment Variables like used in other languages? https://github.com/paypal-examples/docs-examples/blob/main/advanced-integration/v2/server/dotnet/README.md
|
||
app = Flask(__name__) | ||
|
||
load_dotenv() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove the dotenv reference as the README steps for other languages direct the user to explicitly add the environment variables in their shell.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the .env files and update the README to match.
I also caught at the last moment that Integration appears to be misspelled as Integartion
in all the server README files. I've corrected it here for the new additions which were based on the existing READMEs, but thought I'd point that out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @LeonarthusMectus, It has been fixed in other languages
7045763
to
b519dbf
Compare
.gitignore
Outdated
@@ -101,6 +101,7 @@ dist | |||
.tern-port | |||
|
|||
# dotnet | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sure can. I missed that unwinding a bad rebase.
This PR adds server example implementations for both standard & advanced integrations.
The HTML front end was used to validate both language backends in both standard & advanced integrations as per the instructions provided in the repository including the PayPal flow + card fields flow (for advanced).