payment247 /
sdk
This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Payment247\SDK\Requests; |
||
| 4 | |||
| 5 | trait TransactionTrait |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @return float |
||
| 9 | */ |
||
| 10 | 1 | public function getAmount() |
|
| 11 | { |
||
| 12 | 1 | return $this->raw['amount']; |
|
|
0 ignored issues
–
show
|
|||
| 13 | } |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param float $amount |
||
| 17 | */ |
||
| 18 | 1 | public function setAmount($amount) |
|
| 19 | { |
||
| 20 | 1 | $this->raw['amount'] = $amount; |
|
| 21 | 1 | } |
|
| 22 | |||
| 23 | /** |
||
| 24 | * @return string |
||
| 25 | */ |
||
| 26 | 1 | public function getCurrency() |
|
| 27 | { |
||
| 28 | 1 | return $this->raw['currency']; |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string $currency |
||
| 33 | */ |
||
| 34 | 1 | public function setCurrency($currency) |
|
| 35 | { |
||
| 36 | 1 | $this->raw['currency'] = $currency; |
|
| 37 | 1 | } |
|
| 38 | |||
| 39 | /** |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | 1 | public function getOrderId() |
|
| 43 | { |
||
| 44 | 1 | return $this->raw['order_id']; |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param string $orderId |
||
| 49 | */ |
||
| 50 | 1 | public function setOrderId($orderId) |
|
| 51 | { |
||
| 52 | 1 | $this->raw['order_id'] = $orderId; |
|
| 53 | 1 | } |
|
| 54 | |||
| 55 | /** |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | 1 | public function getUser() |
|
| 59 | { |
||
| 60 | 1 | return $this->raw['user']; |
|
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @param string $user |
||
| 65 | */ |
||
| 66 | 1 | public function setUser($user) |
|
| 67 | { |
||
| 68 | 1 | $this->raw['user'] = $user; |
|
| 69 | 1 | } |
|
| 70 | |||
| 71 | /** |
||
| 72 | * @return string[] |
||
| 73 | */ |
||
| 74 | 1 | public function getPaymentSystems() |
|
| 75 | { |
||
| 76 | 1 | return $this->raw['ps']; |
|
| 77 | } |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @param string[] $paymentSystems |
||
| 81 | */ |
||
| 82 | 1 | public function setPaymentSystems($paymentSystems = []) |
|
| 83 | { |
||
| 84 | 1 | if (!is_array($paymentSystems)) { |
|
| 85 | 1 | $paymentSystems = func_get_args(); |
|
| 86 | } |
||
| 87 | |||
| 88 | 1 | $this->raw['ps'] = $paymentSystems; |
|
| 89 | 1 | } |
|
| 90 | |||
| 91 | /** |
||
| 92 | * @return array |
||
| 93 | */ |
||
| 94 | 1 | public function getFlowParameters() |
|
| 95 | { |
||
| 96 | 1 | return $this->raw['flow_parameters']; |
|
| 97 | } |
||
| 98 | |||
| 99 | /** |
||
| 100 | * @param array $flowParameters |
||
| 101 | */ |
||
| 102 | 1 | public function setFlowParameters($flowParameters) |
|
| 103 | { |
||
| 104 | 1 | $this->raw['flow_parameters'] = $flowParameters; |
|
| 105 | 1 | } |
|
| 106 | |||
| 107 | /** |
||
| 108 | * @return string |
||
| 109 | */ |
||
| 110 | 1 | public function getSuccessUrl() |
|
| 111 | { |
||
| 112 | 1 | return $this->raw['success_url']; |
|
| 113 | } |
||
| 114 | |||
| 115 | /** |
||
| 116 | * @param string $successUrl |
||
| 117 | */ |
||
| 118 | 1 | public function setSuccessUrl($successUrl) |
|
| 119 | { |
||
| 120 | 1 | $this->raw['success_url'] = $successUrl; |
|
| 121 | 1 | } |
|
| 122 | |||
| 123 | /** |
||
| 124 | * @return string |
||
| 125 | */ |
||
| 126 | 1 | public function getPendingUrl() |
|
| 127 | { |
||
| 128 | 1 | return $this->raw['pending_url']; |
|
| 129 | } |
||
| 130 | |||
| 131 | /** |
||
| 132 | * @param string $pendingUrl |
||
| 133 | */ |
||
| 134 | 1 | public function setPendingUrl($pendingUrl) |
|
| 135 | { |
||
| 136 | 1 | $this->raw['pending_url'] = $pendingUrl; |
|
| 137 | 1 | } |
|
| 138 | |||
| 139 | /** |
||
| 140 | * @return string |
||
| 141 | */ |
||
| 142 | 1 | public function getFailUrl() |
|
| 143 | { |
||
| 144 | 1 | return $this->raw['fail_url']; |
|
| 145 | } |
||
| 146 | |||
| 147 | /** |
||
| 148 | * @param string $failUrl |
||
| 149 | */ |
||
| 150 | 1 | public function setFailUrl($failUrl) |
|
| 151 | { |
||
| 152 | 1 | $this->raw['fail_url'] = $failUrl; |
|
| 153 | 1 | } |
|
| 154 | |||
| 155 | /** |
||
| 156 | * @return string |
||
| 157 | */ |
||
| 158 | 1 | public function getEmail() |
|
| 159 | { |
||
| 160 | 1 | return $this->raw['email']; |
|
| 161 | } |
||
| 162 | |||
| 163 | /** |
||
| 164 | * @param string $email |
||
| 165 | */ |
||
| 166 | 1 | public function setEmail($email) |
|
| 167 | { |
||
| 168 | 1 | $this->raw['email'] = $email; |
|
| 169 | 1 | } |
|
| 170 | |||
| 171 | /** |
||
| 172 | * @return array |
||
| 173 | */ |
||
| 174 | 1 | public function getCustom() |
|
| 175 | { |
||
| 176 | 1 | return $this->raw['custom']; |
|
| 177 | } |
||
| 178 | |||
| 179 | /** |
||
| 180 | * @param array $custom |
||
| 181 | */ |
||
| 182 | 1 | public function setCustom($custom) |
|
| 183 | { |
||
| 184 | 1 | $this->raw['custom'] = $custom; |
|
| 185 | 1 | } |
|
| 186 | } |
||
| 187 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: