-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathPostCreatePayFlowPaymentMethodEvent.php
More file actions
75 lines (65 loc) · 1.7 KB
/
PostCreatePayFlowPaymentMethodEvent.php
File metadata and controls
75 lines (65 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
namespace Drupal\commerce_paypal\Event;
use Drupal\commerce_payment\Entity\PaymentMethodInterface;
use Symfony\Component\EventDispatcher\Event;
/**
* Defines the 'Post-create PayFlow payment method' event.
*
* @see \Drupal\commerce_paypal\Event\PaypalEvents
*/
class PostCreatePayFlowPaymentMethodEvent extends Event {
/**
* The payment details.
*
* @var array
*/
protected $paymentDetails;
/**
* The payment method.
*
* @var \Drupal\commerce_payment\Entity\PaymentMethodInterface
*/
protected $paymentMethod;
/**
* Constructs a new PostCreatePayFlowPaymentMethodEvent object.
*
* @param \Drupal\commerce_payment\Entity\PaymentMethodInterface $payment_method
* The payment method.
* @param array $payment_details
* The payment details.
*/
public function __construct(PaymentMethodInterface $payment_method, array $payment_details) {
$this->paymentDetails = $payment_details;
$this->paymentMethod = $payment_method;
}
/**
* Gets the payment details
*
* @return array
* The payment details
*/
public function getPaymentDetails() {
return $this->paymentDetails;
}
/**
* Gets the payment method.
*
* @return \Drupal\commerce_payment\Entity\PaymentMethodInterface $payment_method
* The payment method.
*/
public function getPaymentMethod() {
return $this->paymentMethod;
}
/**
* Sets the payment method.
*
* @param \Drupal\commerce_payment\Entity\PaymentMethodInterface $payment_method
* The payment method.
*
* @return $this
*/
public function setPaymentMethod(PaymentMethodInterface $payment_method) {
$this->paymentMethod = $payment_method;
return $this;
}
}