PluginProbe
PayPlug for WooCommerce (Official) / 3.1.0
PayPlug for WooCommerce (Official) v3.1.0
3.1.0 3.0.0 2.18.0 1.0.17 1.0.18 1.0.19 1.0.20 1.0.21 1.0.22 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1.0 1.10.0 1.10.1 1.2.1 1.2.10 1.2.11 1.2.2 1.2.3 1.2.4 1.2.5 All 102 releases
← All changes | src/Gateway/PayplugApi.php +0 -39 3.0.0 → 3.1.0 View file →
@@ -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 {