-
Notifications
You must be signed in to change notification settings - Fork 6
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
Issue #2843999 by mglaman, bojanz, vasike: Implement IPN handler. #4
base: 8.x-1.x
Are you sure you want to change the base?
Conversation
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.
As of right now I do not need a requirement to have a process and a validate method. The IPN shouldn't be that different between each API that is needs to be overridden.
Also, @bojanz I'm still torn on the Trait vs abstract PayPalIPNGatewayBase class which just has these methods. Payflow Gateway would still extend proper base class, but EC/Standard would extend new class.
* @return \Drupal\commerce_payment\Entity\PaymentInterface | ||
* Payment object. | ||
*/ | ||
public function loadPaymentByRemoteId($remote_id) { |
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.
Is there an issue to port this to the payment storage? If so, let's make a @todo
referencing it. If not, make the issue and make the @todo
:)
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.
new issue and patch for Commerce
https://www.drupal.org/node/2856209
and i'll put in a comment as suggested
thanks
*/ | ||
public function processIpnRequest(Request $request) { | ||
// Validate and get IPN request data. | ||
$ipn_data = $this->getIpnRequestValidate($request); |
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.
Since this method is pretty empty, let's just keep validation in here as part of the process. We can always split out later if needed. Otherwise we'd just need to call "validate".
*/ | ||
public function getIpnRequestValidate(Request $request) { | ||
// Get IPN request data. | ||
$ipn_data = $this->getRequestDataArray($request->getContent()); |
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.
This should be in process, if we keep both methods. Process gets data, then sends it to be validated.
…nto 2843999-ipn-handler
…nto 2843999-ipn-handler
46a1e17
to
7285d56
Compare
No description provided.