Skip to content

Commit

Permalink
2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dyd committed Jul 9, 2024
1 parent 75b39b4 commit 6b03c8b
Show file tree
Hide file tree
Showing 38 changed files with 1,859 additions and 481 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
2.0.1
-----
**Features**:

* Added Get Consumer Cards API support
* Added support for the following Klarna API services:
* Release Remaining Authorization
* Resend Invoice
* Update Order Items
* Update Order Address
* Added Processed Batches API support via e-comprocessing endpoint
* Added Trustly Select Account API support
* Added Trustly Register Account API support
* Removed Giropay support through the Web Payment Form and standalone transaction request

2.0.0
-----
*Features**:
Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,6 @@ Financial\OnlineBankingPayments\Bancomer
Financial\OnlineBankingPayments\Bradesco
Financial\OnlineBankingPayments\Davivienda
Financial\OnlineBankingPayments\Eps
Financial\OnlineBankingPayments\GiroPay
Financial\OnlineBankingPayments\Ideal
Financial\OnlineBankingPayments\Idebit\Payin
Financial\OnlineBankingPayments\Idebit\Payout
Expand Down Expand Up @@ -1406,6 +1405,7 @@ NonFinancial\Consumers\Retrieve
NonFinancial\Consumers\Update
NonFinancial\Consumers\Disable
NonFinancial\Consumers\Enable
NonFinancial\Consumers\GetCards
// Chargeback information request
NonFinancial\Fraud\Chargeback\DateRange
Expand Down Expand Up @@ -1471,6 +1471,19 @@ NonFinancial\TokenizationApi\GetCard
// Billing Transactions API
NonFinancial\BillingApi\Transaction
// APM Klarna Services
NonFinancial\Alternatives\Klarna\ReleaseAuthorization
NonFinancial\Alternatives\Klarna\ResendInvoice
NonFinancial\Alternatives\Klarna\UpdateAddress
NonFinancial\Alternatives\Klarna\UpdateItems
// Processed Batches API - Available only via E-Comprocessing endpoint
NonFinancial\ProcessedBatches\PostDateRange
// Trustly APM Services
NonFinancial\Alternatives\Trustly\RegisterAccount
NonFinancial\Alternatives\Trustly\SelectAccount
```

More information about each one of the request types can be found in the Genesis API Documentation and the Wiki
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.0.1
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "genesisgateway/genesis_php",
"description": "PHP Client for Genesis Payment Processing Gateway",
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT",
"keywords": [
"3ds_v2",
Expand Down Expand Up @@ -55,7 +55,6 @@
"fx_search",
"fx_tier",
"fx_tiers",
"giropay",
"ideal",
"idebit",
"idebit_payin",
Expand Down
1 change: 0 additions & 1 deletion spec/Genesis/Api/Constants/Transaction/TypesSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public function it_should_be_true_for_refundable_types()
$typesObject::EFECTY,
$typesObject::EPS,
$typesObject::FASHIONCHEQUE,
$typesObject::GIROPAY,
$typesObject::GOOGLE_PAY,
$typesObject::IDEAL,
$typesObject::IDEBIT_PAYIN,
Expand Down
16 changes: 2 additions & 14 deletions spec/Genesis/Api/Request/Financial/Alternatives/PproSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function it_should_contain_proper_structure_with_optional_parameters()
{
$this->setRequestParameters();

$this->setPaymentType('giropay');
$this->setPaymentType('safetypay');
$this->setCurrency('EUR');
$this->setBillingCountry('DE');
$this->setBic('AGB3SSWI');
Expand All @@ -40,18 +40,6 @@ public function it_should_contain_proper_structure_with_optional_parameters()
$this->getDocument()->shouldContain('<iban>DE12345678901234567890</iban>');
}

public function it_should_fail_with_improper_iban()
{
$this->setRequestParameters();

$this->setPaymentType('giropay');
$this->setCurrency('EUR');
$this->setBillingCountry('DE');

$this->setIban('BG12345678901234567890');
$this->shouldThrow()->during('getDocument');
}

public function it_should_contain_proper_structure_without_optional_parameters()
{
$faker = $this->getFaker();
Expand All @@ -60,7 +48,7 @@ public function it_should_contain_proper_structure_without_optional_parameters()

$this->setUsage('Genesis PHP Client Automated Request');
$this->setRemoteIp($faker->ipv4);
$this->setPaymentType('giropay');
$this->setPaymentType('safetypay');
$this->setReturnSuccessUrl($faker->url);
$this->setReturnFailureUrl($faker->url);
$this->setCurrency('EUR');
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace spec\Genesis\Api\Request\NonFinancial\Alternatives\Klarna;

use Genesis\Api\Request\NonFinancial\Alternatives\Klarna\ReleaseAuthorization;
use Genesis\Builder;
use PhpSpec\ObjectBehavior;
use spec\SharedExamples\Genesis\Api\Request\RequestExamples;

/**
* Class ReleaseAuthorizationSpec
* @package spec\Genesis\Api\Request\NonFinancial\Alternatives\Klarna
*/
class ReleaseAuthorizationSpec extends ObjectBehavior
{
use RequestExamples;

public function it_is_initializable()
{
$this->shouldHaveType(ReleaseAuthorization::class);
}

public function it_should_use_builder_xml()
{
$this->getApiConfig('format')->shouldBe(Builder::XML);
}

public function it_should_contain_correct_parent_node()
{
$this->setRequestParameters();
$this->getDocument()->shouldContain('release_remaining_authorization_request');
}

public function it_should_fail_when_missing_required_params()
{
$this->testMissingRequiredParameters(['transaction_id']);
}

protected function setRequestParameters()
{
$faker = $this->getFaker();

$this->setTransactionId($faker->numberBetween(1, PHP_INT_MAX));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace spec\Genesis\Api\Request\NonFinancial\Alternatives\Klarna;

use Genesis\Api\Request\NonFinancial\Alternatives\Klarna\ResendInvoice;
use Genesis\Builder;
use PhpSpec\ObjectBehavior;
use spec\SharedExamples\Genesis\Api\Request\RequestExamples;

/**
* Class ResendInvoiceSpec
* @package spec\Genesis\Api\Request\NonFinancial\Alternatives\Klarna
*/
class ResendInvoiceSpec extends ObjectBehavior
{
use RequestExamples;

public function it_is_initializable()
{
$this->shouldHaveType(ResendInvoice::class);
}

public function it_should_use_builder_xml()
{
$this->getApiConfig('format')->shouldBe(Builder::XML);
}

public function it_should_contain_correct_parent_node()
{
$this->setRequestParameters();
$this->getDocument()->shouldContain('resend_invoice_request');
}

public function it_should_fail_when_missing_required_params()
{
$this->testMissingRequiredParameters(['transaction_id']);
}

protected function setRequestParameters()
{
$faker = $this->getFaker();

$this->setTransactionId($faker->numberBetween(1, PHP_INT_MAX));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php

namespace spec\Genesis\Api\Request\NonFinancial\Alternatives\Klarna;

use Genesis\Api\Request\NonFinancial\Alternatives\Klarna\UpdateAddress;
use Genesis\Builder;
use Genesis\Exceptions\ErrorParameter;
use PhpSpec\ObjectBehavior;
use spec\SharedExamples\Genesis\Api\Request\RequestExamples;

/**
* Class UpdateAddressSpec
* @package spec\Genesis\Api\Request\NonFinancial\Alternatives\Klarna
*/
class UpdateAddressSpec extends ObjectBehavior
{
use RequestExamples;

public function it_is_initializable()
{
$this->shouldHaveType(UpdateAddress::class);
}

public function it_should_use_builder_xml()
{
$this->getApiConfig('format')->shouldBe(Builder::XML);
}

public function it_should_contain_correct_parent_node()
{
$this->setRequestParameters();
$this->getDocument()->shouldContain('update_order_address_request');
}

public function it_should_fail_when_missing_required_params()
{
$this->testMissingRequiredParameters([
'transaction_id',
'billing_country',
'shipping_country'
]);
}

protected function setRequestParameters()
{
$faker = $this->getFaker();

$this->setTransactionId($faker->numberBetween(1, PHP_INT_MAX));

$this->setBillingFirstName($faker->firstName);
$this->setBillingLastName($faker->lastName);
$this->setBillingAddress1($faker->streetAddress);
$this->setBillingZipCode($faker->postcode);
$this->setBillingCity($faker->city);
$this->setBillingState($faker->state);
$this->setBillingCountry($faker->countryCode());

$this->setShippingFirstName($faker->firstName);
$this->setShippingLastName($faker->lastName);
$this->setShippingAddress1($faker->streetAddress);
$this->setShippingZipCode($faker->postcode);
$this->setShippingCity($faker->city);
$this->setShippingState($faker->state);
$this->setShippingCountry($faker->countryCode());
}
}
Loading

0 comments on commit 6b03c8b

Please sign in to comment.