18 | */
19 | class MissingExtensionException extends \Exception
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Monolog\Processor;
13 |
14 | /**
15 | * Injects memory_get_usage in all records
16 | *
17 | * @see Monolog\Processor\MemoryProcessor::__construct() for options
18 | * @author Rob Jensen
19 | */
20 | class MemoryUsageProcessor extends MemoryProcessor
21 | {
22 | /**
23 | * @param array $record
24 | * @return array
25 | */
26 | public function __invoke(array $record)
27 | {
28 | $bytes = memory_get_usage($this->realUsage);
29 | $formatted = $this->formatBytes($bytes);
30 |
31 | $record['extra']['memory_usage'] = $formatted;
32 |
33 | return $record;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Monolog\Processor;
13 |
14 | /**
15 | * Adds value of getmypid into records
16 | *
17 | * @author Andreas Hörnicke
18 | */
19 | class ProcessIdProcessor implements ProcessorInterface
20 | {
21 | /**
22 | * @param array $record
23 | * @return array
24 | */
25 | public function __invoke(array $record)
26 | {
27 | $record['extra']['process_id'] = getmypid();
28 |
29 | return $record;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Monolog\Processor;
13 |
14 | /**
15 | * An optional interface to allow labelling Monolog processors.
16 | *
17 | * @author Nicolas Grekas
18 | */
19 | interface ProcessorInterface
20 | {
21 | /**
22 | * @return array The processed records
23 | */
24 | public function __invoke(array $records);
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/.gitignore:
--------------------------------------------------------------------------------
1 | /.idea/
2 | /vendor/
3 | /tests/report
4 | /tests/mock/db_test.sqlite
5 | composer.lock
6 | .phpunit.result.cache
7 | coverage
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM php:5.6-cli
2 |
3 | RUN docker-php-ext-install opcache
4 |
5 | RUN pecl install xdebug-2.5.5
6 | RUN docker-php-ext-enable xdebug
7 |
8 | RUN ["apt-get", "update"]
9 | RUN ["apt-get", "install", "-y", "zip"]
10 | RUN ["apt-get", "install", "-y", "unzip"]
11 |
12 | RUN php -r "copy('http://getcomposer.org/installer', 'composer-setup.php');"
13 | RUN php composer-setup.php
14 | RUN php -r "unlink('composer-setup.php');"
15 | RUN mv composer.phar /usr/local/bin/composer
16 |
17 | RUN chown -R ${UID}:${GID} /root/.composer
18 | RUN mkdir -p /.composer && chown -R ${UID}:${GID} /.composer
19 |
20 | VOLUME /root/.composer
21 | VOLUME /.composer
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/codacy-coverage.phar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pagarme/woocommerce/8b71dbd02e596bed92bf68d691d76db719a69690/vendor/pagarme/ecommerce-module-core/codacy-coverage.phar
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/docker-compose.yml.example:
--------------------------------------------------------------------------------
1 | version: '3.2'
2 |
3 | services:
4 | ecommerce_module_core:
5 | build: "./"
6 | container_name: php_ecommerce_module_core
7 | volumes:
8 | - ./:/var/www/html/
9 | ports:
10 | - "8100:8100"
11 | working_dir: /var/www/html
12 | tty: true
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/hooks/pre-commit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | getMessage();
10 | exit(1);
11 | } catch(\Throwable $e) {
12 | echo $e->getMessage();
13 | exit(1);
14 | }
15 |
16 | if ($returnCode !== 0) {
17 | echo PHP_EOL . implode($output, PHP_EOL) . PHP_EOL;
18 | echo "Aborting commit..." . PHP_EOL;
19 | exit(1);
20 | }
21 |
22 | echo array_pop($output) . PHP_EOL;
23 |
24 | exit(0);
25 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Hub/Commands/UpdateCommand.php:
--------------------------------------------------------------------------------
1 | isHubEnabled()) {
15 | throw new Exception("Hub is not installed!");
16 | }
17 |
18 | $hubKey = $moduleConfig->getSecretKey();
19 | if (!$hubKey->equals($this->getAccessToken())) {
20 | throw new Exception("Access Denied.");
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Hub/ValueObjects/HubInstallToken.php:
--------------------------------------------------------------------------------
1 | platformCreditmemo = $platformCreditmemo;
14 | }
15 |
16 | public function getPlatformCreditmemo()
17 | {
18 | return $this->platformCreditmemo;
19 | }
20 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Kernel/Abstractions/AbstractDataService.php:
--------------------------------------------------------------------------------
1 | getTable();
17 |
18 | $result = null;
19 | if (isset($table[$string])) {
20 | $result = $table[$string];
21 | }
22 | return $result;
23 | }
24 |
25 | abstract protected function getTable();
26 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Kernel/Abstractions/AbstractInvoiceDecorator.php:
--------------------------------------------------------------------------------
1 | platformInvoice = $platformInvoice;
14 | }
15 |
16 | public function getPlatformInvoice()
17 | {
18 | return $this->platformInvoice;
19 | }
20 |
21 | /**
22 | * @since 1.7.2
23 | */
24 | public function addComment($comment)
25 | {
26 | $comment = 'PGM - ' . $comment;
27 | $this->addMPComment($comment);
28 | }
29 |
30 | /**
31 | * @since 1.7.2
32 | */
33 | abstract protected function addMPComment($comment);
34 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Kernel/Exceptions/InvalidClassException.php:
--------------------------------------------------------------------------------
1 | message = $message;
18 | $this->success = $success;
19 | $this->object = $object;
20 | }
21 |
22 | public function isSuccess()
23 | {
24 | return $this->success;
25 | }
26 |
27 | public function getMessage()
28 | {
29 | return $this->message;
30 | }
31 |
32 | public function getObject()
33 | {
34 | return $this->object;
35 | }
36 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Kernel/ValueObjects/Id/AccountId.php:
--------------------------------------------------------------------------------
1 | client = $this->services();
24 | }
25 | private function auth()
26 | {
27 | return new PagarmeCoreApiClient($this->getHubToken(), "");
28 | }
29 |
30 | public function services()
31 | {
32 | return $this->auth();
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Middle/Interfaces/CardInterface.php:
--------------------------------------------------------------------------------
1 | isPSP()) {
14 | return '';
15 | }
16 |
17 | return parent::validate($storeSettings);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Middle/Model/Common/Document.php:
--------------------------------------------------------------------------------
1 | setDocumentNumber($documentNumber);
13 | }
14 |
15 | private function setDocumentNumber($document)
16 | {
17 | $this->documentNumber = $document;
18 | }
19 | public function getDocumentWithoutMask()
20 | {
21 | return preg_replace("/\D/" , "",$this->documentNumber);
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Middle/Model/Marketplace/IndividualRegisterInformation.php:
--------------------------------------------------------------------------------
1 | getEmail(),
13 | $this->getDocumentNumber(),
14 | $this->getType(),
15 | $this->getSiteUrl(),
16 | $this->getPhoneNumbers(),
17 | $this->getName(),
18 | $this->getMotherName(),
19 | $this->getBirthdate(),
20 | $this->getMonthlyIncome(),
21 | $this->getProfessionalOccupation(),
22 | $this->getAddress()
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Middle/Model/ModelWithErrors.php:
--------------------------------------------------------------------------------
1 | errors;
18 | }
19 |
20 | /**
21 | * @param array $errors
22 | * @return void
23 | */
24 | public function setErrors(array $errors)
25 | {
26 | $this->errors = $errors;
27 | }
28 |
29 | /**
30 | * @param string|null $error
31 | * @return void
32 | */
33 | public function addError($error = null)
34 | {
35 | if (empty($error)) {
36 | return;
37 | }
38 | $this->errors[] = $error;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Middle/Proxy/AccountProxy.php:
--------------------------------------------------------------------------------
1 | client = $auth->services();
18 | }
19 |
20 | public function getAccount($accountId)
21 | {
22 | $response = $this->client->getAccounts()->getAccountById(
23 | $accountId
24 | );
25 | return $response;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Middle/Proxy/CustomerProxy.php:
--------------------------------------------------------------------------------
1 | client = $auth->services();
18 | }
19 |
20 | public function createCustomer($customer)
21 | {
22 | $response = $this->client->getCustomers()->createCustomer(
23 | $customer
24 | );
25 | return $response;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Middle/Proxy/TdsTokenProxy.php:
--------------------------------------------------------------------------------
1 | client = $auth->services();
18 | }
19 |
20 | public function getTdsToken($environment, $accountId)
21 | {
22 | return $this->client->getTdsToken()->getToken(
23 | $environment,
24 | $accountId
25 | );
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Payment/Factories/AddressFactory.php:
--------------------------------------------------------------------------------
1 | setStreet($data->street);
16 | $address->setNumber($data->number);
17 | $address->setComplement($data->complement);
18 | $address->setNeighborhood($data->neighborhood);
19 | $address->setCity($data->city);
20 | $address->setState($data->state);
21 | $address->setZipCode($data->zipCode);
22 | $address->setCountry('BR');
23 |
24 | return $address;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Payment/Interfaces/ConvertibleToSDKRequestsInterface.php:
--------------------------------------------------------------------------------
1 | logService = new OrderLogService();
16 | }
17 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Payment/Traits/WithCustomerTrait.php:
--------------------------------------------------------------------------------
1 | customer;
18 | }
19 |
20 | /**
21 | * @param Customer|null $customer
22 | */
23 | public function setCustomer(Customer $customer)
24 | {
25 | $this->customer = $customer;
26 | }
27 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Payment/Traits/WithOrderTrait.php:
--------------------------------------------------------------------------------
1 | order;
20 | }
21 |
22 | /**
23 | * @param Order $order
24 | */
25 | public function setOrder(Order $order)
26 | {
27 | $this->order = $order;
28 | }
29 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Payment/ValueObjects/AbstractCardIdentifier.php:
--------------------------------------------------------------------------------
1 | logService = new OrderLogService();
15 | }
16 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Recurrence/Services/RulesCheckoutService.php:
--------------------------------------------------------------------------------
1 | checkRepetitionIsCompatible(
17 | $repetitionSelected
18 | );
19 |
20 | $productSubscriptionCompatible = $productSubscriptionInCart->checkProductHasSamePaymentMethod(
21 | $productSubscriptionSelected
22 | );
23 |
24 | return $repetitionCompatible && $productSubscriptionCompatible;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Recurrence/Services/SubProductService.php:
--------------------------------------------------------------------------------
1 | getSubProductRepository();
12 | return $subProductRepository->findByRecurrenceIdAndProductId(
13 | $recurrenceId,
14 | $productId
15 | );
16 | }
17 |
18 | protected function getSubProductRepository()
19 | {
20 | return new SubProductRepository();
21 | }
22 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Recurrence/ValueObjects/InvoiceIdValueObject.php:
--------------------------------------------------------------------------------
1 | getPagarmeId()->getValue()} already handled!";
16 | parent::__construct($message, 200);
17 | }
18 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Webhook/Exceptions/WebhookHandlerNotFoundException.php:
--------------------------------------------------------------------------------
1 | getType()->getEntityType()}." .
17 | "{$webhook->getType()->getAction()} webhook not found!";
18 | parent::__construct($message, 200, null);
19 | }
20 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/src/Webhook/ValueObjects/WebhookId.php:
--------------------------------------------------------------------------------
1 | repo = $this->getRepository();
18 | }
19 |
20 | abstract public function getRepository();
21 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Abstractions/AbstractSetupTest.php:
--------------------------------------------------------------------------------
1 | down();
22 | }
23 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/Aggregates/LogObjectTests.php:
--------------------------------------------------------------------------------
1 | logObject = new LogObject();
18 | }
19 |
20 | public function testJsonSerialize()
21 | {
22 | $this->assertIsObject($this->logObject->jsonSerialize());
23 | $this->assertInstanceOf(\stdClass::class, $this->logObject->jsonSerialize());
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/I18N/PTBRTests.php:
--------------------------------------------------------------------------------
1 | ptbr = new PTBR();
18 | }
19 |
20 | public function testInfoTableResultWebHookReceived()
21 | {
22 | $this->assertEquals('Webhook recebido: %s %s.%s', $this->ptbr->get('Webhook received: %s %s.%s'));
23 | }
24 |
25 | public function testInfoTableResulInvoicecanceled()
26 | {
27 | $this->assertEquals('Invoice cancelada: #%s', $this->ptbr->get('Invoice canceled: #%s.'));
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/Response/ServiceResponseTest.php:
--------------------------------------------------------------------------------
1 | 200, 'message' => 'ok']);
13 | $this->assertEquals('Foi um sucesso', $object->getMessage());
14 | $this->assertIsObject($object->getObject());
15 | $this->assertInstanceOf(\stdClass::class, $object->getObject());
16 | $this->assertEquals(true, $object->isSuccess());
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Id/AccountIdTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Id/ChargeIdTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Id/CustomerIdTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Id/CycleIdTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Id/GUIDTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Id/InvoiceIdTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Id/MerchantIdTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Id/OrderIdTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Id/SubscriptionIdTest.php:
--------------------------------------------------------------------------------
1 | assertEquals('sub_xxxxxxxxxxxxxxxx', $validStringObject->getValue());
18 |
19 | $this->expectException(InvalidParamException::class);
20 | $validStringObject = new SubscriptionId(self::VALID1."inva");
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Id/TransactionIdTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Key/PublicKeyTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Key/SecretKeyTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Key/TestPublicKeyTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/Key/TestSecretKeyTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/NumericStringTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Kernel/ValueObjects/ValidStringTestTrait.php:
--------------------------------------------------------------------------------
1 | assertEquals(self::VALID1, $validStringObject->getValue());
17 |
18 | $validStringObject = new $class(self::VALID2);
19 | $this->assertEquals(self::VALID2, $validStringObject->getValue());
20 |
21 | $this->expectException(InvalidParamException::class);
22 | $validStringObject = new $class(self::INVALID);
23 | }
24 | }
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Maintenance/Services/InstallDataSource/CoreInstallDataSourceTests.php:
--------------------------------------------------------------------------------
1 | coreInstallDataSource = new CoreInstallDataSource();
18 | }
19 |
20 | public function testGetIntegrityFilePath()
21 | {
22 | $this->assertStringEndsWith(
23 | DIRECTORY_SEPARATOR . 'Assets' . DIRECTORY_SEPARATOR . 'integrityData',
24 | $this->coreInstallDataSource->getIntegrityFilePath()
25 | );
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Recurrence/ValueObjects/PlanIdTest.php:
--------------------------------------------------------------------------------
1 | doValidStringTest();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/Webhook/ValueObjects/WebhookIdTests.php:
--------------------------------------------------------------------------------
1 | assertEquals("hook_" . str_repeat('a', 16), $webhookId->getValue());
15 | }
16 |
17 | public function testValueIsNotValid()
18 | {
19 | $this->expectException(InvalidParamException::class);
20 | $this->expectExceptionMessage(
21 | "Invalid value for " . WebhookId::class . "! Passed value: hook_"
22 | );
23 |
24 | new WebhookId("hook_");
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/pagarme/ecommerce-module-core/tests/mock/ValidStringMock.php:
--------------------------------------------------------------------------------
1 | =7.1",
18 | "ext-curl": "*",
19 | "ext-json": "*",
20 | "ext-mbstring": "*",
21 | "apimatic/unirest-php": "^2.0.0",
22 | "apimatic/jsonmapper": "^1.3.1"
23 | },
24 | "require-dev": {
25 | "squizlabs/php_codesniffer": "^2.7"
26 | },
27 | "autoload": {
28 | "psr-4": {
29 | "PagarmeCoreApiLib\\": "src/"
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/card/getCards.php:
--------------------------------------------------------------------------------
1 | getCustomers();
12 |
13 | $customerId = "cus_ExAmPlExxxxxxxxx";
14 |
15 | $result = $customerController->getCards($customerId, 1, 30);
16 |
17 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/charges/cancelCharge.php:
--------------------------------------------------------------------------------
1 | getCharges();
12 |
13 | $chargeId = "ch_ExAmPlExxxxxxxxx";
14 | $request = new \PagarmeCoreApiLib\Models\CreateCancelChargeRequest();
15 |
16 | $result = $chargesController->cancelCharge($chargeId, $request);
17 |
18 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/charges/cancelChargePartial.php:
--------------------------------------------------------------------------------
1 | getCharges();
12 |
13 | $chargeId = "ch_ExAmPlExxxxxxxxx";
14 | $request = new \PagarmeCoreApiLib\Models\CreateCancelChargeRequest();
15 | $request->amount = 100; // this value should be in cents
16 |
17 | $result = $chargesController->cancelCharge($chargeId, $request);
18 |
19 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/charges/captureCharge.php:
--------------------------------------------------------------------------------
1 | getCharges();
12 |
13 | $chargeId = "ch_ExAmPlExxxxxxxxx";
14 | $request = new \PagarmeCoreApiLib\Models\CreateCaptureChargeRequest();
15 | $request->code = "new_code";
16 |
17 | $result = $chargesController->captureCharge($chargeId, $request);
18 |
19 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/charges/captureChargePartial.php:
--------------------------------------------------------------------------------
1 | getCharges();
12 |
13 | $chargeId = "ch_ExAmPlExxxxxxxxx";
14 | $request = new \PagarmeCoreApiLib\Models\CreateCaptureChargeRequest();
15 | $request->code = "new_code";
16 | $request->amount = 100; // this value should be in cents
17 |
18 | $result = $chargesController->captureCharge($chargeId, $request);
19 |
20 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/charges/getChargeById.php:
--------------------------------------------------------------------------------
1 | getCharges();
12 |
13 | $chargeId = "ch_ExAmPlExxxxxxxxx";
14 |
15 | $result = $chargesController->getCharge($chargeId);
16 |
17 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/charges/retryCharge.php:
--------------------------------------------------------------------------------
1 | getCharges();
12 |
13 | $chargeId = "ch_ExAmPlExxxxxxxxx";
14 |
15 | $result = $chargesController->retryCharge($chargeId);
16 |
17 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/customer/getCustomerById.php:
--------------------------------------------------------------------------------
1 | getCustomers();
12 |
13 | $customerId = "cus_ExAmPlExxxxxxxxx";
14 |
15 | $result = $customersController->getCustomer($customerId);
16 |
17 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/customer/updateCustomer.php:
--------------------------------------------------------------------------------
1 | getCustomers();
12 |
13 | $request = new \PagarmeCoreApiLib\Models\UpdateCustomerRequest();
14 | $request->name = "Peter Parker";
15 | $request->email = "parker@avengers.com";
16 |
17 | $customerId = "cus_ExAmPlExxxxxxxxx";
18 |
19 | $result = $customerController->updateCustomer($customerId, $request);
20 |
21 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/invoice/getInvoiceById.php:
--------------------------------------------------------------------------------
1 | getInvoices();
12 |
13 | $invoiceId = "in_ExAmPlExxxxxxxxx";
14 |
15 | $result = $invoicesController->getInvoice($invoiceId);
16 |
17 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/marketplace/createTransfer.php:
--------------------------------------------------------------------------------
1 | getRecipients();
12 |
13 | $request = new \PagarmeCoreApiLib\Models\CreateTransferRequest();
14 | $request->amount = 100; // this value should be in cents
15 |
16 | $recipientId = "rp_ExAmPlExxxxxxxxx";
17 |
18 | $result = $recipientsController->createTransfer($recipientId, $request);
19 |
20 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/order/getOrderById.php:
--------------------------------------------------------------------------------
1 | getOrders();
12 |
13 | $orderId = "or_ExAmPlExxxxxxxxx";
14 |
15 | $result = $orderController->getOrder($orderId);
16 |
17 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/subscription/cancelSubscription.php:
--------------------------------------------------------------------------------
1 | getSubscriptions();
12 |
13 | $subscriptionId = "sub_ExAmPlExxxxxxxxx";
14 |
15 | $request = new \PagarmeCoreApiLib\Models\CreateCancelSubscriptionRequest();
16 | $request->cancelPendingInvoices = true;
17 |
18 | $result = $subscriptionsController->cancelSubscription($subscriptionId, $request);
19 |
20 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/examples/subscription/getSubscriptionById.php:
--------------------------------------------------------------------------------
1 | getSubscriptions();
12 |
13 | $subscriptionId = "sub_ExAmPlExxxxxxxxx";
14 |
15 | $result = $subscriptionsController->getSubscription($subscriptionId);
16 |
17 | echo json_encode($result, JSON_PRETTY_PRINT);
--------------------------------------------------------------------------------
/vendor/pagarme/pagarmecoreapi/src/Configuration.php:
--------------------------------------------------------------------------------
1 | logger = $logger;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/psr/log/Psr/Log/NullLogger.php:
--------------------------------------------------------------------------------
1 | logger) { }`
11 | * blocks.
12 | */
13 | class NullLogger extends AbstractLogger
14 | {
15 | /**
16 | * Logs with an arbitrary level.
17 | *
18 | * @param mixed $level
19 | * @param string $message
20 | * @param array $context
21 | *
22 | * @return void
23 | *
24 | * @throws \Psr\Log\InvalidArgumentException
25 | */
26 | public function log($level, $message, array $context = array())
27 | {
28 | // noop
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/psr/log/Psr/Log/Test/DummyTest.php:
--------------------------------------------------------------------------------
1 | =5.3.0"
15 | },
16 | "autoload": {
17 | "psr-4": {
18 | "Psr\\Log\\": "Psr/Log/"
19 | }
20 | },
21 | "extra": {
22 | "branch-alias": {
23 | "dev-master": "1.1.x-dev"
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const defaultConfig = require('@wordpress/scripts/config/webpack.config');
2 | const DependencyExtractionWebpackPlugin = require('@woocommerce/dependency-extraction-webpack-plugin');
3 |
4 | module.exports = {
5 | ...defaultConfig,
6 | plugins: [
7 | ...defaultConfig.plugins.filter(
8 | (plugin) =>
9 | plugin.constructor.name !== 'DependencyExtractionWebpackPlugin'
10 | ),
11 | new DependencyExtractionWebpackPlugin(),
12 | ],
13 | entry: {
14 | pix: './assets/javascripts/front/reactCheckout/payments/Pix/index.js',
15 | billet: './assets/javascripts/front/reactCheckout/payments/Billet/index.js',
16 | credit_card: './assets/javascripts/front/reactCheckout/payments/CreditCard/index.js',
17 | },
18 | };
19 |
--------------------------------------------------------------------------------