/** * 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":7053,"date":"2025-06-23T02:21:46","date_gmt":"2025-06-23T02:21:46","guid":{"rendered":"https:\/\/hostamy.com\/?p=7053"},"modified":"2025-06-23T02:21:46","modified_gmt":"2025-06-23T02:21:46","slug":"finest-online-casinos-mobile-experience-high-quality-video-gaming-on-the-go","status":"publish","type":"post","link":"https:\/\/hostamy.com\/en_gb\/finest-online-casinos-mobile-experience-high-quality-video-gaming-on-the-go\/","title":{"rendered":"Finest Online Casinos Mobile: Experience High-Quality Video Gaming on the Go"},"content":{"rendered":"
With the advent of mobile phones and tablets, mobile pc gaming has actually become progressively preferred. The ease of having the ability to play your favorite gambling enterprise video games anytime and anywhere has actually reinvented the gambling sector. In this write-up, we will discover the best mobile casinos that provide a seamless and pleasurable gaming experience on the go.<\/p>\n
Mobile online casinos have actually come a lengthy means because their creation. Initially, the minimal processing power of mobile devices and slow web link hindered the development of top quality casino games. Nonetheless, developments in cassinos online legais portugal<\/a> modern technology have actually currently made it possible to appreciate a variety of games on your mobile device without endangering on efficiency or graphics.<\/p>\n Today, the very best mobile casinos use a varied range of video games, including ports, table games, live casino, and even sporting activities wagering. These video games are specifically optimized for smart phones, making certain smooth gameplay and immersive graphics.<\/p>\n Furthermore, mobile casinos offer a straightforward interface that is very easy to navigate, allowing players to discover their favorite video games effortlessly. The mobile experience is designed to be as close as feasible to the desktop computer version, providing a smooth change for gamers who favor video gaming on their mobile devices.<\/p>\n When it comes to mobile gaming, gambling establishment applications provide a superior experience contrasted to browser-based gambling enterprises. The apps are particularly made for smart phones, making the most of the tool’s capacities and making certain ideal efficiency.<\/p>\n Below are some of the very best online casino apps available:<\/p>\n These apps are offered for both iOS and Android devices, making them easily accessible to a wide variety of gamers. They can be downloaded from the Application Shop or Google Play Shop, depending upon the tool.<\/p>\n One of the advantages of playing at mobile casinos is the accessibility of unique incentives and promotions. Mobile players often receive special offers, such as no down payment bonus offers, complimentary spins, and match deposit rewards, which can significantly improve their video gaming experience.<\/p>\n Furthermore, lots of mobile casinos have commitment programs or VIP systems that award gamers for their ongoing support. These programs provide numerous benefits, such as customized perks, committed account supervisors, and quicker withdrawal times.<\/p>\n It is essential to check out the conditions associated with these perks and promotions to make sure a smooth and satisfying pc gaming experience. Pay attention to wagering requirements, expiry dates, and video game restrictions to maximize these deals.<\/p>\n When dipping into mobile casinos, safety must always be a leading concern. Credible mobile gambling enterprises use cutting edge file encryption technology to secure gamers’ individual and financial info. They are licensed and regulated by respectable gaming authorities, ensuring fair and transparent gameplay.<\/p>\n Prior to signing up at a mobile casino, it is essential to verify its qualifications. Seek licenses from well-known authorities, such as the UK Betting Compensation or the Malta Gaming Authority. Additionally, read testimonials online kaszin\u00f3 j\u00e1t\u00e9kok<\/a> and look for any type of history of security breaches or gamer issues.<\/p>\n Mobile casinos have revolutionized the gambling sector by providing a high-quality video gaming experience on the move. With the right mobile gambling establishment app, gamers can appreciate a wide array of games, exclusive bonus offers, and a protected video gaming atmosphere. Whether you are a casual gamer or a skilled casino player, mobile casino sites provide an amazing and convenient way to delight in your preferred gambling enterprise video games anytime and anywhere.<\/p>\n So, why wait? Download a credible mobile casino app today and start a memorable gaming experience!<\/p>","protected":false},"excerpt":{"rendered":" With the advent of mobile phones and tablets, mobile pc gaming has actually become progressively preferred. The ease of having the ability to play your favorite gambling enterprise video games anytime and anywhere has actually reinvented the gambling sector. In this write-up, we will discover the best mobile casinos that provide a seamless and pleasurable<\/p>","protected":false},"author":23,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pmpro_default_level":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-7053","post","type-post","status-publish","format-standard","hentry","category-uncategorized","pmpro-has-access"],"yoast_head":"\n2. Leading Mobile Casino Apps<\/h2>\n
\n
3. Mobile Gambling Enterprise Bonuses and Promos<\/h2>\n
4. Mobile Gambling Enterprise Protection<\/h2>\n
In Conclusion<\/h3>\n