public function parseReserveResource(ResourceModel $resource)
    {
        $intent = $resource->getIntent();
        $customer = $resource->getCustomer();
        $transaction = $resource->getTransaction();
        $amount = $transaction->getAmount();
        $total = Formatter::formatToInteger($amount->getTotal());
        $payuReference = $resource->getPayUReference() ?: $resource->getReturn()->getPayUReference();
        $merchantReference = $resource->getMerchantReference() ?: $resource->getReturn()->getMerchantReference();

        $payload = array(
            'TransactionType' => strtoupper($resource->intent),
            'AdditionalInformation' => array(
                'merchantReference' => $merchantReference,
                'payUReference' => $payuReference
            ),
            'Basket' => array(
                'currencyCode' => $amount->currency,
                'amountInCents' => $total
            ),
        );


        if ($intent === Transaction::TYPE_FINALIZE) {
            $paymentMethod = $customer->getPaymentMethod();
            if ($paymentMethod && PaymentMethod::TYPE_CREDITCARD == $paymentMethod) {
                $payload = array_merge($payload, array(
                    'Creditcard' => array(
                        'amountInCents' => $total
                    )
                ));
            }
        }

        return $payload;
    }