/** * The API for operations with orders. * * @package WooCommerce\PayPalCommerce\Api * * @phpcs:disable Squiz.Commenting.FunctionCommentThrowTag */ declare (strict_types=1); namespace WooCommerce\PayPalCommerce\Api; use Exception; use InvalidArgumentException; use RuntimeException; use WC_Order; use WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint; use WooCommerce\PayPalCommerce\ApiClient\Entity\Order; use WooCommerce\PayPalCommerce\PPCP; use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway; use WooCommerce\PayPalCommerce\WcGateway\Helper\RefundFeesUpdater; use WooCommerce\PayPalCommerce\WcGateway\Processor\AuthorizedPaymentsProcessor; use WooCommerce\PayPalCommerce\WcGateway\Processor\OrderProcessor; use WooCommerce\PayPalCommerce\WcGateway\Processor\RefundProcessor; /** * Returns the PayPal order. * * @param string|WC_Order $paypal_id_or_wc_order The ID of PayPal order or a WC order (with the ID in meta). * @throws InvalidArgumentException When the argument cannot be used for retrieving the order. * @throws Exception When the operation fails. */ function ppcp_get_paypal_order($paypal_id_or_wc_order): Order { if ($paypal_id_or_wc_order instanceof WC_Order) { $paypal_id_or_wc_order = $paypal_id_or_wc_order->get_meta(PayPalGateway::ORDER_ID_META_KEY); if (!$paypal_id_or_wc_order) { throw new InvalidArgumentException('PayPal order ID not found in meta.'); } } if (!is_string($paypal_id_or_wc_order)) { throw new InvalidArgumentException('Invalid PayPal order ID, string expected.'); } $order_endpoint = PPCP::container()->get('api.endpoint.order'); assert($order_endpoint instanceof OrderEndpoint); return $order_endpoint->order($paypal_id_or_wc_order); } /** * Creates a PayPal order for the given WC order. * * @param WC_Order $wc_order The WC order. * @throws Exception When the operation fails. */ function ppcp_create_paypal_order_for_wc_order(WC_Order $wc_order): Order { $order_processor = PPCP::container()->get('wcgateway.order-processor'); assert($order_processor instanceof OrderProcessor); return $order_processor->create_order($wc_order); } /** * Captures the PayPal order. * * @param WC_Order $wc_order The WC order. * @throws InvalidArgumentException When the order cannot be captured. * @throws Exception When the operation fails. */ function ppcp_capture_order(WC_Order $wc_order): void { $intent = strtoupper((string) $wc_order->get_meta(PayPalGateway::INTENT_META_KEY)); if ($intent !== 'AUTHORIZE') { throw new InvalidArgumentException('Only orders with "authorize" intent can be captured.'); } $captured = wc_string_to_bool($wc_order->get_meta(AuthorizedPaymentsProcessor::CAPTURED_META_KEY)); if ($captured) { throw new InvalidArgumentException('The order is already captured.'); } $authorized_payment_processor = PPCP::container()->get('wcgateway.processor.authorized-payments'); assert($authorized_payment_processor instanceof AuthorizedPaymentsProcessor); if (!$authorized_payment_processor->capture_authorized_payment($wc_order)) { throw new RuntimeException('Capture failed.'); } } /** * Reauthorizes the PayPal order. * * @param WC_Order $wc_order The WC order. * @throws InvalidArgumentException When the order cannot be captured. * @throws Exception When the operation fails. */ function ppcp_reauthorize_order(WC_Order $wc_order): void { $intent = strtoupper((string) $wc_order->get_meta(PayPalGateway::INTENT_META_KEY)); if ($intent !== 'AUTHORIZE') { throw new InvalidArgumentException('Only orders with "authorize" intent can be reauthorized.'); } $captured = wc_string_to_bool($wc_order->get_meta(AuthorizedPaymentsProcessor::CAPTURED_META_KEY)); if ($captured) { throw new InvalidArgumentException('The order is already captured.'); } $authorized_payment_processor = PPCP::container()->get('wcgateway.processor.authorized-payments'); assert($authorized_payment_processor instanceof AuthorizedPaymentsProcessor); if ($authorized_payment_processor->reauthorize_payment($wc_order) !== AuthorizedPaymentsProcessor::SUCCESSFUL) { throw new RuntimeException($authorized_payment_processor->reauthorization_failure_reason() ?: 'Reauthorization failed.'); } } /** * Refunds the PayPal order. * Note that you can use wc_refund_payment() to trigger the refund in WC and PayPal. * * @param WC_Order $wc_order The WC order. * @param float $amount The refund amount. * @param string $reason The reason for the refund. * @return string The PayPal refund ID. * @throws InvalidArgumentException When the order cannot be refunded. * @throws Exception When the operation fails. */ function ppcp_refund_order(WC_Order $wc_order, float $amount, string $reason = ''): string { $order = ppcp_get_paypal_order($wc_order); $refund_processor = PPCP::container()->get('wcgateway.processor.refunds'); assert($refund_processor instanceof RefundProcessor); return $refund_processor->refund($order, $wc_order, $amount, $reason); } /** * Voids the authorization. * * @param WC_Order $wc_order The WC order. * @throws InvalidArgumentException When the order cannot be voided. * @throws Exception When the operation fails. */ function ppcp_void_order(WC_Order $wc_order): void { $order = ppcp_get_paypal_order($wc_order); $refund_processor = PPCP::container()->get('wcgateway.processor.refunds'); assert($refund_processor instanceof RefundProcessor); $refund_processor->void($order); } /** * Updates the PayPal refund fees totals on an order. * * @param WC_Order $wc_order The WC order. */ function ppcp_update_order_refund_fees(WC_Order $wc_order): void { $updater = PPCP::container()->get('wcgateway.helper.refund-fees-updater'); assert($updater instanceof RefundFeesUpdater); $updater->update($wc_order); } {"id":7249,"date":"2025-08-02T15:10:42","date_gmt":"2025-08-02T15:10:42","guid":{"rendered":"https:\/\/hostamy.com\/?p=7249"},"modified":"2025-08-02T15:10:42","modified_gmt":"2025-08-02T15:10:42","slug":"free-slots-no-downloads-a-practical-and-exciting-method-to-play-online-gamings","status":"publish","type":"post","link":"https:\/\/hostamy.com\/en_gb\/free-slots-no-downloads-a-practical-and-exciting-method-to-play-online-gamings\/","title":{"rendered":"Free Slots No Downloads: A Practical and Exciting Method to Play Online Gamings"},"content":{"rendered":"
Are you searching for an enjoyable and problem-free means to play on-line casino site games? Look no further than cost-free slots no downloads. This cutting-edge video gaming option permits you to appreciate the euphoria of slots without the demand to download any type of software program. With a wide variety of video games offered, totally free slots no downloads are a convenient and interesting method to experience the adventure of wagering from the comfort of your very own home.<\/p>\n
In this post, we will certainly explore the advantages and functions of complimentary ports no downloads, go over how they function, and provide valuable ideas on maximizing your video gaming experience. Whether you are a seasoned gamer or brand-new to the globe of on-line betting, this write-up will serve as your best overview to totally free ports no downloads.<\/p>\n
There are numerous advantages to playing complimentary ports no downloads. Let’s take a closer check out some of the vital benefits:<\/p>\n
1.No Download and install Required:<\/strong> Unlike typical on-line gambling establishments, totally free ports no downloads get rid of the need to download and install any software program or applications. This suggests that you can begin playing your preferred games instantaneously, without squandering time on installations.<\/p>\n 2.Ease:<\/strong> With cost-free slots no downloads, you can play anytime, anywhere, as long as you have an internet link. Whether you get on a desktop computer, laptop computer, or mobile phone, accessibility to a vast array of games is simply a couple of clicks away.<\/p>\n 3.Cost-Effective:<\/strong> As the name recommends, cost-free ports no downloads do not require any kind of monetary investment. You can enjoy hours of amusement without spending a penny, making it a suitable alternative for those on a budget.<\/p>\n 4.Range of Gamings:<\/strong> Free ports no downloads use a huge choice of games to cater to every player’s choices. From classic slot machines to modern-day video clip slots with interactive attributes, there is something for every person to take pleasure in.<\/p>\n 5.Method and Understanding:<\/strong> Free ports no downloads give an outstanding opportunity for newbies to discover and practice their slot gaming abilities. You can acquaint yourself with various game auto mechanics, strategies, and wagering options without risking any kind of actual money.<\/p>\n Free slots no downloads operate on the same principles as traditional slot machines, with the key difference being the absence of software downloads. These games utilize HTML5 technology, which allows them to be played straight via an internet internet browser.<\/p>\n When you access a free port no download game, it will certainly fill quickly on your gadget, offering you with a smooth video gaming experience. The game’s visuals, appears, and performances are all integrated into the web page, getting rid of the need for additional software program installments.<\/p>\n Furthermore, cost-free slots no downloads are usually offered in trial setting. This suggests that you can play the video game with virtual credits rather than actual cash. While you won’t be able to win any cash prizes in demonstration setting, you can still appreciate all the functions and ice casino<\/a> gameplay aspects.<\/p>\n\n
Exactly How Free Ports No Downloads Job<\/h2>\n
Tips for Maximizing Your Gaming Experience<\/h2>\n