Skip to content

Implement GetExpressCheckoutDetails and MassPay operations #11

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

Closed
wants to merge 7 commits into from
Closed

Implement GetExpressCheckoutDetails and MassPay operations #11

wants to merge 7 commits into from

Conversation

alfaproject
Copy link

In our business we need to do extra risk and security checks, and thus I had the necessity to implement this express operation.

I have created unit tests for it, and also made the AbstractRequest a little bit better, imo.

There are no BC breaks, so you can just up the middle version number if you want. (;

@alfaproject alfaproject changed the title Implement GetExpressCheckoutDetails operation Implement GetExpressCheckoutDetails and MassPay operations Apr 4, 2014
@alfaproject
Copy link
Author

I took the opportunity to add MassPay to this PR.
I only realised I was working on the develop branch now, and I'm sorry for that, but I can start over and do proper PRs for separate features if you want.

Either way, it shouldn't matter. These features don't break existing code, and they don't conflict between each other. (;

@amacneil
Copy link
Contributor

amacneil commented Apr 5, 2014

That's ok, it's just that large pull requests take me longer to review. I'll try to add some comments, but it might be easier if the masspay stuff is a separate PR.

* PayPal Express Gateway
*
* @author Adrian Macneil <adrian@adrianmacneil.com>
* @author Joao Dias <joao.dias@cherrygroup.com>
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm explicitly avoiding adding any @author type tags or copyright notices in omnipay, since it can get ridiculous trying to decide what is a "significant" enough contribution to warrant being mentioned here. With git & github it's trivial to see who authored what.

Copy link
Author

Choose a reason for hiding this comment

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

Fair enough, I'll remove those in the next update.

@amacneil
Copy link
Contributor

amacneil commented Apr 5, 2014

Wait, how is GetExpressCheckoutDetails different from GetTransactionDetails added in #3?

@alfaproject
Copy link
Author

GetTransactionDetails is used to get information about a specific transaction, and thus requires a transaction id.
https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/GetTransactionDetails_API_Operation_NVP/

GetExpressCheckoutDetails is used to get information about a specific checkout, and thus requires the checkout token. (the transaction wasn't made yet)
https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/GetExpressCheckoutDetails_API_Operation_NVP/

@amacneil
Copy link
Contributor

amacneil commented Apr 8, 2014

I see. So you are expected to call GetExpressCheckoutDetails after the user returns from PayPal, but before you confirm the transaction (so you have a chance to confirm once again the details with them)? That makes more sense.

In that case, along with the Omnipay conventions perhaps we can call this fetchCheckoutDetails()? (so far we have fetchTransaction(), fetchCreditCard() etc for remote operations to distinguish them from simple parameter getters/setters).

@amacneil
Copy link
Contributor

amacneil commented Apr 8, 2014

I recently moved some of the files around (in line with PSR-4), so you will probably need to update your PR to match. I'd also much prefer to review the MassPay stuff separately, since this is already quite a large pull request. Let me know when you've addressed the issues above, and I'll take a look at it :)

@alfaproject
Copy link
Author

I'll create 2 new PRs for both methods using your newest code. It's probably better then creating a commit to remove MassPay on this branch. I don't think I can do it today, because I'm mega busy at work finishing off one of our newer APIs, but I'll defo do it this week.

@amacneil
Copy link
Contributor

amacneil commented Apr 8, 2014

Cool, no hurry.

FYI you can easily rebase/squash your commits and force push to this branch to update the PR.

On 8 Apr 2014, at 4:32 pm, João Dias notifications@github.com wrote:

I'll create 2 new PRs for both methods using your newest code. It's probably better then creating a commit to remove MassPay on this branch. I don't think I can do it today, because I'm mega busy at work finishing off one of our newer APIs, but I'll defo do it this week.


Reply to this email directly or view it on GitHub.

@alfaproject
Copy link
Author

Ah yeah, your right. Forgot about that. Cheers. (;

@tomsowerby
Copy link

I'd like to see this implemented too. Is it still under development?

@da40
Copy link

da40 commented Jun 4, 2014

I too would appreciate it if this fork could be merged, as PayPal Express is unusable without GetExpressCheckoutDetails. Don't need the MassPay part.

@amacneil
Copy link
Contributor

amacneil commented Jun 4, 2014

Someone care to make a new PR with just the GetExpressCheckoutDetails part? I think the method in omnipay should probably be named $gateway->fetchCheckout(), but open to suggestions.

@tomsowerby
Copy link

On it.

@tomsowerby
Copy link

Added PR #18

@amacneil
Copy link
Contributor

Fixed by #18

@amacneil amacneil closed this Jun 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants