# pay-wp/trunk/src/Helpers/RPANDecoder.php

Autopay dla WooCommerce, version trunk. 19 lines.

- Page: https://pluginprobe.com/plugins/pay-wp/trunk/code/src/Helpers/RPANDecoder.php
- Raw: https://pluginprobe.com/plugins/pay-wp/trunk/raw/src/Helpers/RPANDecoder.php
- Modified: 2026-08-20T13:01:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/pay-wp/trunk/code/src/Helpers/RPANDecoder.php#L10-L20`.

```php
<?php

namespace WPDesk\GatewayWPPay\Helpers;

class RPANDecoder {
	public function base64_to_array( string $encoded_data ): array {

		try {
			$decoded_data = base64_decode( $encoded_data );
			$xml_data     = simplexml_load_string( $decoded_data );
		} catch ( \Exception $e ) {
			return [];
		}


		return DataConverter::simplexml_to_array( $xml_data );
	}
}

```
