<commit_before><?php namespace Ordercloud\Requests\Payments\Handlers;

use Ordercloud\Requests\Handlers\AbstractPostRequestHandler;
use Ordercloud\Requests\Payments\CreateCreditCardPaymentRequest;
use Ordercloud\Support\Reflection\EntityReflector;

class CreateCreditCardPaymentRequestHandler extends AbstractPostRequestHandler
{
    /**
     * @param CreateCreditCardPaymentRequest $request
     */
    protected function configure($request)
    {
        $creditCard = $request->getCard();

        $this->setUrl('/resource/orders/%d/pay/creditcard/%s', $request->getOrderID(), $request->getPaymentGateway())
            ->setBodyParameters([
                'budgetPeriod'    => $request->getBudgetPeriod(),
                'cardExpiryMonth' => $creditCard->getExpiryMonth(),
                'cardExpiryYear'  => $creditCard->getExpiryYear(),
                'nameOnCard'      => $creditCard->getNameOnCard(),
                'cvv'             => $creditCard->getCvv(),
                'cardNumber'      => $creditCard->getCardNumber(),
                'threeDSecure'    => $request->isThreeDSecure(),
            ]);
    }

    protected function transformResponse($response)
    {
        return EntityReflector::parseResourceIDFromURL($response->getUrl());
    }
}
<commit_msg>zero pad cc payment expiry month<commit_after><?php namespace Ordercloud\Requests\Payments\Handlers;

use Ordercloud\Requests\Handlers\AbstractPostRequestHandler;
use Ordercloud\Requests\Payments\CreateCreditCardPaymentRequest;
use Ordercloud\Support\Reflection\EntityReflector;

class CreateCreditCardPaymentRequestHandler extends AbstractPostRequestHandler
{
    /**
     * @param CreateCreditCardPaymentRequest $request
     */
    protected function configure($request)
    {
        $creditCard = $request->getCard();

        $this->setUrl('/resource/orders/%d/pay/creditcard/%s', $request->getOrderID(), $request->getPaymentGateway())
            ->setBodyParameters([
                'budgetPeriod'    => $request->getBudgetPeriod(),
                'cardExpiryMonth' => sprintf('%02d', $creditCard->getExpiryMonth()),
                'cardExpiryYear'  => $creditCard->getExpiryYear(),
                'nameOnCard'      => $creditCard->getNameOnCard(),
                'cvv'             => $creditCard->getCvv(),
                'cardNumber'      => $creditCard->getCardNumber(),
                'threeDSecure'    => $request->isThreeDSecure(),
            ]);
    }

    protected function transformResponse($response)
    {
        return EntityReflector::parseResourceIDFromURL($response->getUrl());
    }
}

{'fraction_non_alphanumeric': 0.12759415833973867, 'fraction_numerical': 0.0007686395080707148, 'mean_word_length': 2.949924127465857, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6542861', 'n_tokens_mistral': 719, 'n_tokens_neox': 695, 'n_words': 94}