public function redirect(array $data = []): ?array
    {
        if (! isset($data['billplz']) || ! \is_array($data['billplz'])) {
            throw new InvalidArgumentException('Expected $billplz to be an array!');
        }

        $bill = [
            'billplzid' => $data['billplz']['id'],
            'billplzpaid' => $data['billplz']['paid'],
            'billplzpaid_at' => $data['billplz']['paid_at'],
            'x_signature' => $data['billplz']['x_signature'] ?? null,
        ];

        $validated = $this->validateAgainstSignature($bill, $this->client->getSignatureKey(), [
            'billplzid', 'billplzpaid_at', 'billplzpaid',
        ]);

        if ((bool) $validated) {
            return $this->filterResponse($data['billplz']);
        }

        return null;
    }
public function redirect(array $data = []): ?array
    {
        if (! isset($data['billplz']) || ! \is_array($data['billplz'])) {
            throw new InvalidArgumentException('Expected $billplz to be an array!');
        }

        $bill = [
            'billplzid' => $data['billplz']['id'],
            'billplzpaid' => $data['billplz']['paid'],
            'billplzpaid_at' => $data['billplz']['paid_at'],
            'x_signature' => $data['billplz']['x_signature'] ?? null,
        ];

        $validated = $this->validateAgainstSignature($bill, $this->client->getSignatureKey(), [
            'billplzid', 'billplzpaid_at', 'billplzpaid',
        ]);

        if ((bool) $validated) {
            return $this->filterResponse($data['billplz']);
        }

        return null;
    }
public function redirect ( array $ data = [ ] ) : ? array { if ( ! isset ( $ data [ 'billplz' ] ) || ! \ is_array ( $ data [ 'billplz' ] ) ) { throw new InvalidArgumentException ( 'Expected $billplz to be an array!' ) ; } $ bill = [ 'billplzid' => $ data [ 'billplz' ] [ 'id' ] , 'billplzpaid' => $ data [ 'billplz' ] [ 'paid' ] , 'billplzpaid_at' => $ data [ 'billplz' ] [ 'paid_at' ] , 'x_signature' => $ data [ 'billplz' ] [ 'x_signature' ] ?? null , ] ; $ validated = $ this -> validateAgainstSignature ( $ bill , $ this -> client -> getSignatureKey ( ) , [ 'billplzid' , 'billplzpaid_at' , 'billplzpaid' , ] ) ; if ( ( bool ) $ validated ) { return $ this -> filterResponse ( $ data [ 'billplz' ] ) ; } return null ; }
Parse redirect data for a bill.

@param  array  $data

@return array|null
Parse redirect data for a bill .