| @@ -7,13 +7,10 @@ | ||
| 7 | 7 | exit; |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | use Payplug\Core\HttpClient; |
| 11 | -use Payplug\Exception\BadRequestException; | |
| 12 | 11 | use Payplug\Exception\ConfigurationException; |
| 13 | -use Payplug\Exception\ForbiddenException; | |
| 14 | 12 | use Payplug\Exception\NotFoundException; |
| 15 | -use Payplug\Exception\PayplugServerException; | |
| 16 | 13 | use Payplug\Exception\UnauthorizedException; |
| 17 | 14 | use Payplug\Payplug; |
| 18 | 15 | use Payplug\PayplugWoocommerce\PayplugWoocommerceHelper; |
| 19 | 16 | use Payplug\PayplugWoocommerce\Traits\ServiceGetter; |
| @@ -218,44 +215,8 @@ | ||
| 218 | 215 | */ |
| 219 | 216 | public function refund_create($transaction_id, $data) |
| 220 | 217 | { |
| 221 | 218 | return $this->do_request_with_fallback('\Payplug\Refund::create', [$transaction_id, $data]); |
| 222 | - } | |
| 223 | - | |
| 224 | - /** | |
| 225 | - * Simulate a oney payment | |
| 226 | - * | |
| 227 | - * @return array | |
| 228 | - */ | |
| 229 | - public function simulate_oney_payment($price, $oney_type = 'with_fees') | |
| 230 | - { | |
| 231 | - $country = PayplugWoocommerceHelper::get_payplug_merchant_country(); | |
| 232 | - $oney_fees = ['x3_' . $oney_type, 'x4_' . $oney_type]; | |
| 233 | - | |
| 234 | - try { | |
| 235 | - try { | |
| 236 | - try { | |
| 237 | - try { | |
| 238 | - $response = $this->do_request('\Payplug\OneySimulation::getSimulations', [[ | |
| 239 | - 'amount' => intval(floatval($price) * 100), | |
| 240 | - 'country' => $country, | |
| 241 | - 'operations' => $oney_fees, | |
| 242 | - ]]); | |
| 243 | - PayplugWoocommerceHelper::oney_simulation_values($oney_fees, $response); | |
| 244 | - } catch (PayplugServerException $e) { | |
| 245 | - $response = __('Your payment schedule simulation is temporarily unavailable. You will find this information at the payment stage.', 'payplug'); | |
| 246 | - } | |
| 247 | - } catch (BadRequestException $e) { | |
| 248 | - $response = __('Your payment schedule simulation is temporarily unavailable. You will find this information at the payment stage.', 'payplug'); | |
| 249 | - } | |
| 250 | - } catch (UnauthorizedException $e) { | |
| 251 | - $response = __('Your payment schedule simulation is temporarily unavailable. You will find this information at the payment stage.', 'payplug'); | |
| 252 | - } | |
| 253 | - } catch (ForbiddenException $e) { | |
| 254 | - $response = __('Your payment schedule simulation is temporarily unavailable. You will find this information at the payment stage.', 'payplug'); | |
| 255 | - } | |
| 256 | - | |
| 257 | - return $response; | |
| 258 | 219 | } |
| 259 | 220 | |
| 260 | 221 | public function validate_jwt($client_data, $jwt) |
| 261 | 222 | { |