Skip to content
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

Feature/paypal permissions api integration #70

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5e6d7c1
Changed .gitignore
dmytro-pro Mar 17, 2016
a418f73
Added app.php & app_dev.php according to modern official userguide
dmytro-pro Mar 17, 2016
50e7267
Updated AppKernel.php to use local configs too
dmytro-pro Mar 17, 2016
704bf4b
Added variables initialization to index.php (to make env selection wo…
dmytro-pro Mar 17, 2016
151c073
Merge branch 'feature/d-pro_master' into feature/core-improvements
dmytro-pro Mar 17, 2016
6f5ac4f
Added PayPal permissions SDK to dependencies
dmytro-pro Mar 28, 2016
de2ad86
Made Permissions API -> getRequestToken + getAccess as a single action
dmytro-pro Mar 28, 2016
75dfaa7
Added stubs; added "get-request-token" action controller
dmytro-pro Mar 28, 2016
6acc4c3
Added "get-access-token" action controller; small refactoring
dmytro-pro Mar 28, 2016
b3afaec
Cleaning & small refactoring
dmytro-pro Mar 29, 2016
579d805
Added composer.lock to repository
dmytro-pro Mar 29, 2016
4dee726
Restored Details:view.html.twig
dmytro-pro Mar 29, 2016
7be8804
Config fix
dmytro-pro Mar 30, 2016
ff536d7
Added new API and Factory for "ExpressCheckout via token" feature; ad…
dmytro-pro Mar 30, 2016
4f5802c
Added demo action for merchant token feature
dmytro-pro Mar 30, 2016
f6a3a57
Fixes
dmytro-pro Mar 30, 2016
1d3c115
Customized new ApiViaToken class to use AuthToken for authorization, …
dmytro-pro Mar 30, 2016
d0ba6cf
Added subject field to parameters.yml.dist; made the code work (not c…
dmytro-pro Mar 31, 2016
ee0a968
Config fix
dmytro-pro Mar 31, 2016
fd3d9d3
Removed old factories, and used new ones from dev-version of Payum. M…
dmytro-pro Mar 31, 2016
83b8ac2
Fixed demo text
dmytro-pro Mar 31, 2016
ddb5cfc
Small fix
dmytro-pro Mar 31, 2016
e586f3e
Merge branch 'feature/core-improvements' into feature/paypal-permissi…
dmytro-pro Apr 1, 2016
730ff2b
Revert "Changed .gitignore"
dmytro-pro Apr 1, 2016
89f9547
Revert "Added variables initialization to index.php (to make env sele…
dmytro-pro Apr 1, 2016
56cd0c7
Revert "Updated AppKernel.php to use local configs too"
dmytro-pro Apr 1, 2016
b1e154f
Revert "Added app.php & app_dev.php according to modern official user…
dmytro-pro Apr 1, 2016
848016b
Moved PayPal sandbox app id into parameters.yml.dist
dmytro-pro Apr 1, 2016
1a20bff
Config fix
dmytro-pro Apr 1, 2016
2e4a3f9
tokenSecret -> token_secret
dmytro-pro Apr 1, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/config/parameters.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,23 @@ parameters:

locale: en
secret: ThisTokenIsNotSoSecretChangeIt

# always the same
paypal.sandbox_app_id: APP-80W284485P519543T

paypal.express_checkout.username: EDIT ME
paypal.express_checkout.password: EDIT ME
paypal.express_checkout.signature: EDIT ME
paypal.express_checkout.usd_testuser_login: EDIT ME
paypal.express_checkout.usd_testuser_password: EDIT ME

# required only for authorization by merchant token
# see: https://developer.paypal.com/docs/classic/permissions-service/integration-guide/PermissionsAbout/
paypal.express_checkout.token: EDIT ME
paypal.express_checkout.token_secret: EDIT ME
## e-mail of the merchant you work in behalf of
paypal.express_checkout.third_party_subject: EDIT ME
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if user needs a subject he can set it to the payment model directly, remote it from here and from the api options as well


paypal.pro_checkout.username: EDIT ME
paypal.pro_checkout.password: EDIT ME
paypal.pro_checkout.partner: EDIT ME
Expand Down
11 changes: 11 additions & 0 deletions app/config/payum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ payum:
factory: paypal_express_checkout
payum.api: @acme.payment.payum.paypal_express_checkout_api

paypal_express_checkout_permission:
factory: paypal_express_checkout_permission
username: %paypal.express_checkout.username%
password: %paypal.express_checkout.password%
signature: %paypal.express_checkout.signature%
token: %paypal.express_checkout.token%
token_secret: %paypal.express_checkout.token_secret%
third_party_subject: %paypal.express_checkout.third_party_subject%
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not allow it to be configured this way. see above

sandbox: true

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paypal_express_checkout_permission:
    factory: paypal_express_checkout_permission
    username: foo
    password: foo
    access_token: foo
    access_token_secret: foo

paypal_pro_checkout:
factory: paypal_pro_checkout
username: %paypal.pro_checkout.username%
Expand Down Expand Up @@ -187,6 +197,7 @@ payum:
config_key: %sofort.config_key%

foo_bar_gateway:
factory: core
payum.action.capture: @acme_payment.foo_bar.capture
payum.action.status: @acme_payment.foo_bar.status

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"stripe/stripe-php": "^2.0",
"sofort/sofortlib-php": "^3.0",
"phpunit/phpunit": "^4.0",
"fabpot/php-cs-fixer": "^1.10"
"fabpot/php-cs-fixer": "^1.10",
"paypal/permissions-sdk-php": "^3.9"
},
"scripts": {
"post-install-cmd": [
Expand Down
Loading