swedbank-spp / swedbank-payment-portal Goto Github PK
View Code? Open in Web Editor NEWSwedbank Payment Portal API library for PHP
License: Other
Swedbank Payment Portal API library for PHP
License: Other
Unknown value '571' was given for enum SwedbankPaymentPortal\SharedEntity\Type\PurchaseStatus
RuntimeException is being thrown when calling handlePendingTransaction
on PayPalService
class.
This leads to cURL call not being made.
Here is the GetExpressCheckoutDetailsResponse
XML:
<?xml version="1.0" encoding="UTF-8"?>
<Response version="2">
<PayPalTxn>
<ack>Success</ack>
<addressnormalizationstatus>None</addressnormalizationstatus>
<amt>24.20</amt>
<billing_agreement_accepted>0</billing_agreement_accepted>
<build>38544305</build>
<checkoutstatus>PaymentActionNotInitiated</checkoutstatus>
<correlationid>a357f8827cc65</correlationid>
<currencycode>EUR</currencycode>
<custom>****</custom>
<desc>*********</desc>
<errorcode>0</errorcode>
<handlingamt>0.00</handlingamt>
<insuranceamt>0.00</insuranceamt>
<insuranceoptionoffered>false</insuranceoptionoffered>
<invnum>****</invnum>
<shipdiscamt>0.00</shipdiscamt>
<shippingamt>0.00</shippingamt>
<taxamt>0.00</taxamt>
<timestamp>2017-09-05T10:45:48Z</timestamp>
<token>EC-92X45596YN1435128</token>
<version>124.0</version>
</PayPalTxn>
<datacash_reference>3300900018396017</datacash_reference>
<information>User has not yet accessed PayPal account. Please re-submit transaction.</information>
<merchantreference>****_460_req</merchantreference>
<mode>LIVE</mode>
<reason>PayPal: Customer login pending</reason>
<status>571</status>
<time>1504608347</time>
</Response>
Symfony 4 is out and package requires components of symfony 3
I am using SAPP with logging an code look like this:
[...]
$hpsTxn = new Transaction\HPSTxn(
$this->url->link('extension/payment/swedbank_portal/callback_failure', '', 'SSL'), // expire url
$this->url->link('extension/payment/swedbank_portal/callback_success', '', 'SSL'), // return url
$this->url->link('extension/payment/swedbank_portal/callback_failure', '', 'SSL'), // error url
$this->pagesets_card[$this->env][$this->code],
new Transaction\DynamicData(
null,
$this->return_url_from_gateway
));
$transaction = new Transaction($txnDetails, $hpsTxn, new CardTxn());
$setupRequest = new SetupRequest($this->auth, $transaction);
$response = $spp->getPaymentCardHostedPagesGateway()->initPayment(
$setupRequest,
new Swedbank_Ordering_Handler_PaymentCompletedCallback( $ORDER_NUMBER )
);
// ---------->>>>>>>>>>>>>>>>>>>
// following code gives fatal error, if `/tmp/banklink` does not exist or is not writable!
$response = $spp->getPaymentCardHostedPagesGateway()->initPayment(
$setupRequest,
new Swedbank_Ordering_Handler_PaymentCompletedCallback( $ORDER_NUMBER )
);
The ERROR:
InvalidArgumentException
The directory "/tmp/banklink" is not writable.
Comes from: vendor/doctrine/cache/lib/Doctrine/Common/Cache/FileCache.php
public function __construct($directory, $extension = '', $umask = 0002)
{
// YES, this needs to be *before* createPathIfNeeded()
if (! is_int($umask)) {
throw new InvalidArgumentException(sprintf(
'The umask parameter is required to be integer, was: %s',
gettype($umask)
));
}
$this->umask = $umask;
if (! $this->createPathIfNeeded($directory)) {
throw new InvalidArgumentException(sprintf(
'The directory "%s" does not exist and could not be created.',
$directory
));
}
if (! is_writable($directory)) {
throw new InvalidArgumentException(sprintf(
'The directory "%s" is not writable.',
$directory
));
}
We have been struggling with this for almost 2 weeks where SPP support and PayPal both blaming each other. As it turns out - this library is not fully production (live) ready.
There is a hardcoded PayPal sandbox URL - https://github.com/Swedbank-SPP/swedbank-payment-portal/blob/master/src/PayPal/CommunicationEntity/SetExpressCheckoutResponse/SetExpressCheckoutResponse.php#L239
Given method should return corresponding URL based on environment (sandbox or live)
Ping @Swedbank-SPP
How to set currency for HPS paymant method?
$txnDetails = new TxnDetails(
$riskAction,
$merchantReferenceId,
new Amount($purchaseAmount),
new ThreeDSecure(
'Order nr: ' . $merchantReferenceId,
$this->callback_domain,
new \DateTime()
)
);
If i looking at SwedbankPaymentPortal\SharedEntity\Amount class, I see that private $currency = 'EUR' is hardcoded and methods for modify currency is not provided.
When I initiate a HPS payment with customer's country set in human readable format (for example, Latvia
), upon transaction query I get non-interrupting error message which says The 'country' element is invalid - The value 'Latvia' is invalid according to its datatype 'Union' - The value 'Latvia' is not valid according to any of the memberTypes of the union. at line 0, position 0
.
When I initiate a HPS payment with customer's country set to country code (for example, LV
), I do not get such a message.
Docs should be updated with indication that country in customer's details should be formatted as a country code, not human readable format.
Payment initiated with following billing data:
<!-- snip -->
<CustomerDetails>
<OrderDetails>
<BillingDetails>
<name>John Doe</name>
<zip_code>LV-1010</zip_code>
<address_line1>Main street 1</address_line1>
<address_line2></address_line2>
<city>Riga</city>
<country>Latvia</country>
</BillingDetails>
</OrderDetails>
<PersonalDetails>
<!-- snip -->
</PersonalDetails>
<ShippingDetails>
<!-- snip -->
</ShippingDetails>
<PaymentDetails>
<payment_method>CC</payment_method>
</PaymentDetails>
<RiskDetails>
<!-- snip -->
</RiskDetails>
</CustomerDetails>
<!-- snip -->
Transaction query response:
<!-- snip -->
<Risk>
<action_response>
<bankresult_response>
<cpi_value></cpi_value>
<response_code>00</response_code>
<response_message>Successful</response_message>
<transaction_id>xxxxxxxxxxxxxxxx</transaction_id>
</bankresult_response>
<error_response>
<additional_messages>
<message>The 'country' element is invalid - The value 'Latvia' is invalid according to its datatype 'Union' - The value 'Latvia' is not valid according to any of the memberTypes of the union. at line 0, position 0</message>
</additional_messages>
<response_code>997</response_code>
<response_message>Validation of Xml message failed</response_message>
</error_response>
</action_response>
</Risk>
<!-- snip -->
Payment initiated with following billing data:
<!-- snip -->
<CustomerDetails>
<OrderDetails>
<BillingDetails>
<name>John Doe</name>
<zip_code>LV-1010</zip_code>
<address_line1>Main street 1</address_line1>
<address_line2></address_line2>
<city>Riga</city>
<country>LV</country>
</BillingDetails>
</OrderDetails>
<PersonalDetails>
<!-- snip -->
</PersonalDetails>
<ShippingDetails>
<!-- snip -->
</ShippingDetails>
<PaymentDetails>
<payment_method>CC</payment_method>
</PaymentDetails>
<RiskDetails>
<!-- snip -->
</RiskDetails>
</CustomerDetails>
<!-- snip -->
Transaction query response:
<!-- snip -->
<Risk>
<action_response>
<bankresult_response>
<cpi_value></cpi_value>
<response_code>00</response_code>
<response_message>Successful</response_message>
<transaction_id>xxxxxxxxxxxxxxxx</transaction_id>
</bankresult_response>
<screening_response>
<additional_messages>
<message></message>
</additional_messages>
<cpi_value></cpi_value>
<response_code>00</response_code>
<response_message>Transaction Approved</response_message>
<transaction_id>xxxxxxxxxxxxxxxx</transaction_id>
</screening_response>
</action_response>
</Risk>
<!-- snip -->
Please provide HCC card payment example as well. Can't seem to get it working.
This package requires Guzzle 6 or 5
Current version of Guzzle is 7
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
Exception is returned by guzzlehttp curl_exec, when trying to execute "https://accreditation.datacash.com/Transaction/acq_a"
I am on v0.8.22
Today we encountered service timeout:
cURL error 7: Failed to connect to mars.transaction.datacash.com port 443: Connection timed out
We were supplied with secondary production URL, which worked.
It was implied, that we should use both URLs and fallback should be automatic, however I do not see how this library is supposed to do that.
Any advice would be appreciated!
this code throw exception:
$auth = new Authentication($this->login, $this->password);
$options = new ServiceOptions(
new CommunicationOptions($this->endpoint),
$auth
);
SwedbankPaymentPortal::init($options); // it`s line 88 of PaymentService.php
[2017-10-10 21:01:16] production.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Return value of Doctrine\Common\Annotations\AnnotationRegistry::registerLoader() must be an instance of Doctrine\Common\Annotations\void, none returned in /var/www/lk_intergaz/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php:117
Stack trace:
#0 /var/www/lk_intergaz/vendor/swedbank-spp/swedbank-payment-portal/src/Container.php(32): Doctrine\Common\Annotations\AnnotationRegistry::registerLoader('class_exists')
#1 /var/www/lk_intergaz/vendor/swedbank-spp/swedbank-payment-portal/src/SwedbankPaymentPortal.php(39): SwedbankPaymentPortal\Container->getContainer(Object(SwedbankPaymentPortal\Options\ServiceOptions))
#2 /var/www/lk_intergaz/vendor/swedbank-spp/swedbank-payment-portal/src/SwedbankPaymentPortal.php(54): SwedbankPaymentPortal\SwedbankPaymentPortal->__construct(Object(SwedbankPaymentPortal\Options\ServiceOptions))
#3 /var/www/lk_intergaz/app/Services/Payments/PaymentService.php(88): SwedbankPaymentPortal\SwedbankPaymentPortal::init(Object(SwedbankPaymentPortal\Options\ServiceOptions))
Thanks for useful lib.
I have suggestion for improvement:
Current version uses Doctrine's FilesystemCache class for caching TransactionContainer.
Storing serialized object in file system is not an option for projects which have many web servers for load balancing.
If i understand correctly, to store it somewhere else (like database, memory...) the only option is to create and pass custom TransactionRepositoryFactory to ServiceOptions
which would create custom TransactionRepository.
Problem here is that this repository would have to manage not only storing and retrieving serialized object but also serialization/deserialization itself.
So it would be nice to have possibility to pass object which would be responsible only for storing and retrieving string.
When trying to checkout on Windows:
$ git clone https://github.com/Swedbank-SPP/swedbank-payment-portal.git
Cloning into 'swedbank-payment-portal'...
remote: Counting objects: 1108, done.
remote: Compressing objects: 100% (344/344), done.
remote: Total 1108 (delta 748), reused 1108 (delta 748), pack-reused 0
Receiving objects: 100% (1108/1108), 1.89 MiB | 439.00 KiB/s, done.
Resolving deltas: 100% (748/748), done.
Checking connectivity... done.
error: unable to create file docs/classes/SwedbankPaymentPortal.BankLink.CommunicationEntity.PurchaseRequest.Transaction.APMTxn.AlternativePayment.TransactionDetails.BillingDetails.AmountDetails.html (Filename too long)
Checking out files: 100% (941/941), done.
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'
Problem 1
- Conclusion: remove symfony/console v2.8.41
- Conclusion: don't install symfony/console v2.8.41
- symfony/yaml v3.4.0 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.1 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.10 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.11 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.12 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.13 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.14 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.2 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.3 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.4 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.5 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.6 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.7 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.8 conflicts with symfony/console[v2.8.41].
- symfony/yaml v3.4.9 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.0 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.1 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.10 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.11 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.12 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.13 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.14 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.2 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.3 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.4 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.5 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.6 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.7 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.8 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.0.9 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.1.0 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.1.1 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.1.2 conflicts with symfony/console[v2.8.41].
- symfony/yaml v4.1.3 conflicts with symfony/console[v2.8.41].
- Installation request for symfony/console (locked at v2.8.41) -> satisfiable by symfony/console[v2.8.41].
- Installation request for swedbank-spp/swedbank-payment-portal ^0.9.0 -> satisfiable by swedbank-spp/swedbank-payment-portal[v0.9.0].
- Conclusion: don't install symfony/dependency-injection v4.1.0|install symfony/yaml v3.4.0|install symfony/yaml v3.4.1|install symfony/yaml v3.4.10|install symfony/yaml v3.4.11|install symfony/yaml v3.4.12|install symfony/yaml v3.4.13|install symfony/yaml v3.4.14|install symfony/yaml v3.4.2|install symfony/yaml v3.4.3|install symfony/yaml v3.4.4|install symfony/yaml v3.4.5|install symfony/yaml v3.4.6|install symfony/yaml v3.4.7|install symfony/yaml v3.4.8|install symfony/yaml v3.4.9|install symfony/yaml v4.0.0|install symfony/yaml v4.0.1|install symfony/yaml v4.0.10|install symfony/yaml v4.0.11|install symfony/yaml v4.0.12|install symfony/yaml v4.0.13|install symfony/yaml v4.0.14|install symfony/yaml v4.0.2|install symfony/yaml v4.0.3|install symfony/yaml v4.0.4|install symfony/yaml v4.0.5|install symfony/yaml v4.0.6|install symfony/yaml v4.0.7|install symfony/yaml v4.0.8|install symfony/yaml v4.0.9|install symfony/yaml v4.1.0|install symfony/yaml v4.1.1|install symfony/yaml v4.1.2|install symfony/yaml v4.1.3
- Conclusion: remove symfony/dependency-injection v4.1.0|install symfony/yaml v3.4.0|install symfony/yaml v3.4.1|install symfony/yaml v3.4.10|install symfony/yaml v3.4.11|install symfony/yaml v3.4.12|install symfony/yaml v3.4.13|install symfony/yaml v3.4.14|install symfony/yaml v3.4.2|install symfony/yaml v3.4.3|install symfony/yaml v3.4.4|install symfony/yaml v3.4.5|install symfony/yaml v3.4.6|install symfony/yaml v3.4.7|install symfony/yaml v3.4.8|install symfony/yaml v3.4.9|install symfony/yaml v4.0.0|install symfony/yaml v4.0.1|install symfony/yaml v4.0.10|install symfony/yaml v4.0.11|install symfony/yaml v4.0.12|install symfony/yaml v4.0.13|install symfony/yaml v4.0.14|install symfony/yaml v4.0.2|install symfony/yaml v4.0.3|install symfony/yaml v4.0.4|install symfony/yaml v4.0.5|install symfony/yaml v4.0.6|install symfony/yaml v4.0.7|install symfony/yaml v4.0.8|install symfony/yaml v4.0.9|install symfony/yaml v4.1.0|install symfony/yaml v4.1.1|install symfony/yaml v4.1.2|install symfony/yaml v4.1.3
- swedbank-spp/swedbank-payment-portal v0.9.0 requires symfony/yaml ~2.8|~3.0|~4.0 -> satisfiable by symfony/yaml[v2.8.0, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.18, v2.8.19, v2.8.2, v2.8.20, v2.8.21, v2.8.22, v2.8.23, v2.8.24, v2.8.25, v2.8.26, v2.8.27, v2.8.28, v2.8.29, v2.8.3, v2.8.30, v2.8.31, v2.8.32, v2.8.33, v2.8.34, v2.8.35, v2.8.36, v2.8.37, v2.8.38, v2.8.39, v2.8.4, v2.8.40, v2.8.41, v2.8.42, v2.8.43, v2.8.44, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9, v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, v3.1.0, v3.1.1, v3.1.10, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9, v3.2.0, v3.2.1, v3.2.10, v3.2.11, v3.2.12, v3.2.13, v3.2.14, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.2.8, v3.2.9, v3.3.0, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.17, v3.3.18, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.1, v3.4.10, v3.4.11, v3.4.12, v3.4.13, v3.4.14, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6, v3.4.7, v3.4.8, v3.4.9, v4.0.0, v4.0.1, v4.0.10, v4.0.11, v4.0.12, v4.0.13, v4.0.14, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.1, v4.1.2, v4.1.3].
- symfony/yaml v2.8.0 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.1 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.10 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.11 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.12 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.13 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.14 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.15 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.16 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.17 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.18 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.19 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.2 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.20 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.21 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.22 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.23 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.24 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.25 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.26 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.27 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.28 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.29 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.3 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.30 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.31 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.32 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.33 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.34 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.35 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.36 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.37 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.38 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.39 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.4 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.40 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.41 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.42 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.43 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.44 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.5 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.6 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.7 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.8 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v2.8.9 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.0.0 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.0.1 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.0.2 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.0.3 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.0.4 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.0.5 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.0.6 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.0.7 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.0.8 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.0.9 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.1.0 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.1.1 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.1.10 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.1.2 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.1.3 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.1.4 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.1.5 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.1.6 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.1.7 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.1.8 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.1.9 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.0 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.1 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.10 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.11 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.12 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.13 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.14 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.2 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.3 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.4 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.5 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.6 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.7 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.8 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.2.9 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.0 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.1 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.10 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.11 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.12 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.13 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.14 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.15 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.16 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.17 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.18 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.2 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.3 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.4 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.5 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.6 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.7 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.8 conflicts with symfony/dependency-injection[v4.1.0].
- symfony/yaml v3.3.9 conflicts with symfony/dependency-injection[v4.1.0].
- Installation request for symfony/dependency-injection (locked at v4.1.0) -> satisfiable by symfony/dependency-injection[v4.1.0].
Using HCC card payment in test environment I receive this error in the very last step: [FATAL] PCDATA invalid Char value 28 in (line: 37, column: 33).
This error is triggered when this code returns:
$threeDresp = $this->spp->getPaymentCardHostedCardCaptureGateway()->threeDauthentication($ref, $pares);
stacktrace:
#0 /home/webshop/swedbank-spp/vendor/jms/serializer/src/JMS/Serializer/Serializer.php(127): JMS\Serializer\XmlDeserializationVisitor->prepare('<?xml version="...')
#1 [internal function]: JMS\Serializer\Serializer->JMS\Serializer\{closure}(Object(JMS\Serializer\XmlDeserializationVisitor))
#2 /home/webshop/swedbank-spp/vendor/phpoption/phpoption/src/PhpOption/Some.php(89): call_user_func(Object(Closure), Object(JMS\Serializer\XmlDeserializationVisitor))
#3 /home/webshop/swedbank-spp/vendor/jms/serializer/src/JMS/Serializer/Serializer.php(131): PhpOption\Some->map(Object(Closure))
#4 /home/webshop/swedbank-spp/vendor/swedbank-spp/swedbank-payment-portal/src/Serializer.php(48): JMS\Serializer\Serializer->deserialize('<?xml version="...', 'SwedbankPayment...', 'xml')
#5 /home/webshop/swedbank-spp/vendor/swedbank-spp/swedbank-payment-portal/src/Transaction/TransactionRepository.php(199): SwedbankPaymentPortal\Serializer->getObject('<?xml version="...', 'SwedbankPayment...')
#6 /home/webshop/swedbank-spp/vendor/swedbank-spp/swedbank-payment-portal/src/Transaction/TransactionRepository.php(182): SwedbankPaymentPortal\Transaction\TransactionRepository->deSerializeFrame('a:2:{s:7:"reque...')
#7 /home/webshop/swedbank-spp/vendor/swedbank-spp/swedbank-payment-portal/src/Transaction/TransactionRepository.php(82): SwedbankPaymentPortal\Transaction\TransactionRepository->deSerialize('a:7:{s:3:"key";...')
#8 /home/webshop/swedbank-spp/vendor/swedbank-spp/swedbank-payment-portal/src/CC/HCCService/HCCService.php(244): SwedbankPaymentPortal\Transaction\TransactionRepository->get('161631451')
#9 /home/webshop/swedbank-spp/vendor/swedbank-spp/swedbank-payment-portal/src/CC/HCCService/HCCService.php(131): SwedbankPaymentPortal\CC\HCCService\HCCService->hccQuery('161631451')
#10 /home/webshop/swedbank-spp/vendor/swedbank-spp/swedbank-payment-portal/src/CC/HCCService/HCCService.php(230): SwedbankPaymentPortal\CC\HCCService\HCCService->callbackProcessing('161631451', Object(SwedbankPaymentPortal\SharedEntity\Type\TransactionResult), Object(SwedbankPaymentPortal\Transaction\TransactionContainer), Object(SwedbankPaymentPortal\Transaction\TransactionFrame))
#11 /home/webshop/swedbank-spp/src/Controllers/ThreeDeeController.php(40): SwedbankPaymentPortal\CC\HCCService\HCCService->threeDauthentication('161631451', 'eJzVWFmzokoSfud...')
#12 [internal function]: Astro\Controllers\ThreeDeeController->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#13 /home/webshop/swedbank-spp/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#14 /home/webshop/swedbank-spp/vendor/slim/slim/Slim/Route.php(344): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#15 /home/webshop/swedbank-spp/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(122): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#16 /home/webshop/swedbank-spp/vendor/slim/slim/Slim/Route.php(316): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#17 /home/webshop/swedbank-spp/vendor/slim/slim/Slim/App.php(476): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#18 /home/webshop/swedbank-spp/vendor/akrabat/rka-ip-address-middleware/src/IpAddress.php(93): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#19 [internal function]: RKA\Middleware\IpAddress->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#20 /home/webshop/swedbank-spp/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(RKA\Middleware\IpAddress), Array)
#21 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#22 /home/webshop/swedbank-spp/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(73): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\App))
#23 /home/webshop/swedbank-spp/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(122): Slim\App->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#24 /home/webshop/swedbank-spp/vendor/slim/slim/Slim/App.php(370): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#25 /home/webshop/swedbank-spp/vendor/slim/slim/Slim/App.php(295): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#26 /home/webshop/swedbank-spp/public/index.php(33): Slim\App->run()
#27 {main}
DEBUG XML:
-----
setup
<?xml version="1.0" encoding="UTF-8"?>
<Request version="2">
<Authentication>
<password>*******</password>
<client>*******</client>
</Authentication>
<Transaction>
<TxnDetails>
<merchantreference>161631451</merchantreference>
<amount currency="EUR">0.01</amount>
</TxnDetails>
<HpsTxn>
<page_set_id>166</page_set_id>
<method>setup</method>
<return_url>http://dev.noom.ee/swedbank-spp/paymentresult/hcc/confirm/161631451</return_url>
<expiry_url>http://dev.noom.ee/swedbank-spp/paymentresult/hcc/expired/161631451</expiry_url>
<error_url>http://dev.noom.ee/swedbank-spp/paymentresult/hcc/failed/161631451</error_url>
<DynamicData>
<dyn_data_4>http://dev.noom.ee/swedbank-spp/</dyn_data_4>
</DynamicData>
</HpsTxn>
</Transaction>
</Request>
<?xml version="1.0" encoding="UTF-8"?>
<Response version='2'>
<HpsTxn>
<hps_url>https://accreditation.datacash.com/hps-acq_a/</hps_url>
<session_id>2f9af21b-13a4-476b-a5fe-9724e89f13e5</session_id>
</HpsTxn>
<datacash_reference>3200900018894479</datacash_reference>
<merchantreference>161631451</merchantreference>
<mode>LIVE</mode>
<reason>ACCEPTED</reason>
<status>1</status>
<time>1508407546</time>
</Response>
-----
hccQueryRequest
<?xml version="1.0" encoding="UTF-8"?>
<Request version="2">
<Authentication>
<password>*******</password>
<client>*******</client>
</Authentication>
<Transaction>
<HistoricTxn>
<method>query</method>
<reference>3200900018894479</reference>
</HistoricTxn>
</Transaction>
</Request>
<?xml version="1.0" encoding="UTF-8"?>
<Response version='2'>
<HpsTxn>
<capture_status>populated</capture_status>
<card_scheme>Debit Mastercard</card_scheme>
<country>gbr</country>
<cv2_captured>Yes</cv2_captured>
<expirydate>0119</expirydate>
<issuer>Unknown</issuer>
<pan>557347******0001</pan>
</HpsTxn>
<datacash_reference>3200900018894479</datacash_reference>
<information>You have queried an HPS transaction, which has stored data that has not yet been used</information>
<merchantreference>161631451</merchantreference>
<mode>LIVE</mode>
<reason>ACCEPTED</reason>
<status>1</status>
<time>1508407555</time>
</Response>
-----
authorization
<?xml version="1.0" encoding="UTF-8"?>
<Request version="2">
<Authentication>
<password>*******</password>
<client>*******</client>
</Authentication>
<Transaction>
<TxnDetails>
<Risk>
<Action service="1">
<MerchantConfiguration>
<channel>W</channel>
<merchant_location>Estonia</merchant_location>
</MerchantConfiguration>
<CustomerDetails>
<OrderDetails>
<BillingDetails>
<state_province>tt</state_province>
<name>Lennar Kallas</name>
<zip_code>61408</zip_code>
<address_line1>Puu 1 oks 2</address_line1>
<address_line2/>
<city>Tartu</city>
<country>EE</country>
</BillingDetails>
</OrderDetails>
<PersonalDetails>
<first_name>Lennar</first_name>
<surname>Kallas</surname>
<telephone>51944863</telephone>
</PersonalDetails>
<ShippingDetails>
<title>Mr.</title>
<first_name>Lennar</first_name>
<surname>Kallas</surname>
<address_line1>Puu 1 oks 2</address_line1>
<address_line2/>
<city>Tartu</city>
<country>EE</country>
<zip_code>61408</zip_code>
</ShippingDetails>
<PaymentDetails>
<payment_method>CC</payment_method>
</PaymentDetails>
<RiskDetails>
<ip_address>80.235.19.38</ip_address>
<email_address>[email protected]</email_address>
</RiskDetails>
</CustomerDetails>
</Action>
</Risk>
<merchantreference>161631451</merchantreference>
<amount currency="EUR">0.01</amount>
<ThreeDSecure>
<purchase_datetime>20171019 13:06:04</purchase_datetime>
<verify>yes</verify>
<Browser>
<device_category>0</device_category>
</Browser>
<merchant_url>http://dev.noom.ee/swedbank-spp/</merchant_url>
<purchase_desc>Demo makse</purchase_desc>
</ThreeDSecure>
<capturemethod>ecomm</capturemethod>
</TxnDetails>
<CardTxn>
<method>auth</method>
<card_details type="from_hps">3200900018894479</card_details>
</CardTxn>
</Transaction>
</Request>
<?xml version="1.0" encoding="UTF-8"?>
<Response version='2'>
<CardTxn>
<ThreeDSecure>
<acs_url>https://accreditation.datacash.com/acs-acq_a</acs_url>
<pareq_message>eJxdUttugjAYvvcpiPejraCAqU3cuJgXOrf5Ah38UeI42BYPe/q1YjlIQtLv0P5HujsIgPgbkloA
GzkOXYOUfA9Oli7GFXdJGEa+H0RjI2p5u/yCU3PW6AxCZmXBiIvdCUUWWnkNIjnwQllCUzw5va42
zMfh1PMoesBOz0GsYkaw/ShqmM5R8ByYvED6w4ujAqkoulOdIynrQokbCycziizo5Fr8soNS1Ryh
FM5uUZa5C4Dsky+yqhBFxmXrQM+F0G1tCNmPes1Sto6Xl8G/2/sfu0+8+TsuKDKOzp9yBWyCSUAw
iRzizfFsjn2K7nyvYbkpgGEXE92uBnRqZfJYPizG0Sd6HamFgCK5sSgIdUss6gxwrcoC9B09xfbc
yxVkwmLISyfnRwk6SUO07XnuBn17H4w8UXqC02ng+UE7WFNNIwyyyPSoSGTUB2iD2Dd1OLuDZjD3
bWUjioab/A8BB8Xq
</pareq_message>
</ThreeDSecure>
<card_scheme>Debit Mastercard</card_scheme>
<country>United Kingdom</country>
<token>1BB59F398746C6FDB87AD260847FFE94E5B47528</token>
</CardTxn>
<MAC>
<outcome>ACCEPT</outcome>
</MAC>
<acquirer>Swedbank Baltic Latvia</acquirer>
<datacash_reference>3200900018894479</datacash_reference>
<merchantreference>161631451</merchantreference>
<mid>1000000000</mid>
<mode>LIVE</mode>
<reason>3DS Payer Verification Required</reason>
<status>150</status>
<time>1508407564</time>
</Response>
-----
3dauthorization
<?xml version="1.0" encoding="UTF-8"?>
<Request version="2">
<Authentication>
<password>*******</password>
<client>*******</client>
</Authentication>
<Transaction>
<HistoricTxn>
<reference>3200900018894479</reference>
<pares_message>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
</pares_message>
<method>threedsecure_authorization_request</method>
</HistoricTxn>
</Transaction>
</Request>
<?xml version="1.0" encoding="UTF-8"?>
<Response version='2'>
<CardTxn>
<Cv2Avs>
<cv2avs_status>SECURITY CODE MATCH ONLY</cv2avs_status>
</Cv2Avs>
<ThreeDSecure>
<aav>jAAAEAVlaRUIQBUIQHVpAAAAAAA=</aav>
<cardholder_registered>yes</cardholder_registered>
<cavvAlgorithm>3</cavvAlgorithm>
<eci>02</eci>
<xid>MDAwMDAwMDAwMDAwMTg4OTQ0Nzk=</xid>
</ThreeDSecure>
<authcode>361561</authcode>
<card_scheme>Debit Mastercard</card_scheme>
<country>United Kingdom</country>
</CardTxn>
<MAC>
<outcome>ACCEPT</outcome>
</MAC>
<Risk>
<action_response>
<bankresult_response>
<cpi_value></cpi_value>
<response_code>00</response_code>
<response_message>Successful</response_message>
<transaction_id>3200900018894479</transaction_id>
</bankresult_response>
<screening_response>
<additional_messages>
<message></message>
</additional_messages>
<cpi_value></cpi_value>
<response_code>00</response_code>
<response_message>Transaction Approved</response_message>
<transaction_id>3200900018894479</transaction_id>
</screening_response>
</action_response>
</Risk>
<acquirer>Swedbank Baltic Latvia</acquirer>
<datacash_reference>3200900018894479</datacash_reference>
<extended_response_message>Approved, OK</extended_response_message>
<extended_status>000</extended_status>
<merchantreference>3200900018894479</merchantreference>
<mid>1000000000</mid>
<mode>LIVE</mode>
<reason>ACCEPTED</reason>
<status>1</status>
<time>1508407571</time>
</Response>
}
I have a problem with BankLinkService::checkPendingTransactions()
where transactions are not being removed from local transaction repository even if response from the gateway indicates that they are successful.
Steps to reproduce:
$spp->getBankLinkGateway()->initPayment()
with (example) merchant reference ABC
.$spp->getBankLinkGateway()->checkPendingTransactions();
which will query the gateway for status of transaction with merchant reference ABC
. That will trigger the callback in the same manner it did in step 2.\SwedbankPaymentPortal\BankLink\BankLinkService::handlePendingUnfinishedResponse()
has the following code:
$transactionResult = $this->getTransactionResultFromQueryResponse($response);
if ($transactionResult) {
$callback = $container->getCallback();
$callback->handleFinishedTransaction($transactionResult, $transactionFrame);
$this->getTransactionRepository()->remove($merchantReference);
};
$container->addFrame($transactionFrame);
$this->getTransactionRepository()->persist($container);
On successful transaction result transaction with merchant reference is being removed from transaction repository (->remove($merchantReference)
), but then again the container which is obtained with the merchant reference is persisted with ->persist($container)
which stores the transaction as pending again.
Hello, found not a bug, but unhandled status.
We work on Symfony 2 and used ORM Doctrine's default UUID as merchantReferenceId
in HPS SetupRequest. It Appeared that Doctrine's UUID is a bit longer than allowed max length for this parameter (30 symbols). This was found out during debugging Your library which cost time. Exception that was thrown by Your library was not very understood:
"code": 500,
"message": "Unknown value '22' was given for enum SwedbankPaymentPortal\SharedEntity\Type\PurchaseStatus"
It would be nice to make this error more obvious. Thanks!
HCC documentation is poor, therefore I need some help.
I have the following code for HCC card payment:
use SwedbankPaymentPortal\SwedbankPaymentPortal;
use SwedbankPaymentPortal\Options\ServiceOptions;
use SwedbankPaymentPortal\SharedEntity\Authentication;
use SwedbankPaymentPortal\Options\CommunicationOptions;
use SwedbankPaymentPortal\SwedbankPaymentPortal;
use SwedbankPaymentPortal\SharedEntity\Amount;
use SwedbankPaymentPortal\CC\HCCCommunicationEntity\SetupRequest\SetupRequest as HCCSetupRequest;
use SwedbankPaymentPortal\CC\HCCCommunicationEntity\SetupRequest\Transaction as HCCTransaction;
use SwedbankPaymentPortal\SharedEntity\Authentication;
use SwedbankPaymentPortal\UrlCallback;
// SPP options
$options = new ServiceOptions(
new CommunicationOptions('url'), new Authentication('username', 'password'));
// SPP object
$spp = new SwedbankPaymentPortal($options);
$txnDetails = new HCCTransaction\TxnDetails(new Amount('100.00'), '1234567890');
$hpsTxn = new HCCTransaction\HPSTxn(
'https://www.domain.com/spp/hcc/expired/1234567890',
'https://www.domain.com/spp/hcc/success/1234567890',
'https://www.domain.com/spp/hcc/failed/1234567890',
168,
new HCCTransaction\DynamicData(
null,
'https://www.domain.com/shop'
)
);
$transaction = new HCCTransaction($txnDetails, $hpsTxn);
$setupRequest = new HCCSetupRequest($transaction);
$callbackUrl = 'https://www.domain.com/spp/callback/1234567890';
$response = $spp->getPaymentCardHostedCardCaptureGateway()->initPayment(
$setupRequest, UrlCallback::create($callbackUrl)
);
// Redirect URL
$url = $response->getCustomerRedirectUrl();
Payment is finalized after SUCCESS like this:
$spp->getPaymentCardHostedCardCaptureGateway()->hccQuery('1234567890');
Please advise if this is correctly set up.
Currently UrlCallback is never called altough payment is success (I am using TEST environment and credentials if that matters).
UrlCallbacks work fine for all the other SPP payment methods.
I try to use banklink and get exception:
`
$purchaseRequest = (new PurchaseBuilder())
->setDescription("Invoice №$invoice->doc_id")
->setAmountValue($purchaseAmount) // 10000 (100 евро)
->setAmountExponent(1)
->setAmountCurrencyCode($currency_code) // 978 - это для евро
->setConsumerEmail($email_row) // [email protected]
->setServiceType(ServiceType::ltvBank())
->setPaymentMethod(PaymentMethod::swedbank())
->setSuccessUrl($this->callback_domain . 'payments/bank_link/confirm?way=confirmed&order_id=' . $merchantReferenceId)
->setFailureUrl($this->callback_domain . 'payments/bank_link/confirm?way=cancelled&order_id=' . $merchantReferenceId)
->setMerchantReference($merchantReferenceId) // 1091904-181
->setLanguage("ru")
->setPageSetId(1)
->getPurchaseRequest();
$response = $spp->getBankLinkGateway()->initPayment(
$purchaseRequest,
new Swedbank_Ordering_Handler_PaymentCompletedCallback(
$merchantReferenceId
)
); <---— тут ошибка
RuntimeException: Unknown value '2064' was given for enum SwedbankPaymentPortal\SharedEntity\Type\PurchaseStatus in /var/www/lk_intergaz/vendor/swedbank-spp/swedbank-payment-portal/src/SharedEntity/Type/AbstractEnumerableType.php:159
Stack trace:
#0 /var/www/lk_intergaz/vendor/swedbank-spp/swedbank-payment-portal/src/SharedEntity/Type/PurchaseStatus.php(239): SwedbankPaymentPortal\SharedEntity\Type\AbstractEnumerableType->assignId(2064)
#1 /var/www/lk_intergaz/vendor/jms/serializer/src/JMS/Serializer/GraphNavigator.php(239): SwedbankPaymentPortal\SharedEntity\Type\PurchaseStatus->deserialize(Object(JMS\Serializer\XmlDeserializationVisitor), Object(SimpleXMLElement), Object(JMS\Serializer\DeserializationContext))
#2 /var/www/lk_intergaz/vendor/jms/serializer/src/JMS/Serializer/XmlDeserializationVisitor.php(295): JMS\Serializer\GraphNavigator->accept(Object(SimpleXMLElement), Array, Object(JMS\Serializer\DeserializationContext))
#3 /var/www/lk_intergaz/vendor/jms/serializer/src/JMS/Serializer/GraphNavigator.php(261): JMS\Serializer\XmlDeserializationVisitor->visitProperty(Object(JMS\Serializer\Metadata\PropertyMetadata), Object(SimpleXMLElement), Object(JMS\Serializer\DeserializationContext))
Deprecation errors in PHP 7.4
Breaking in PHP 8.0
The problem has been addressed here schmittjoh/serializer#1267
This package uses 1.1, however 3.13 is current version.
A week or so ago the SPP API had been inaccessible at times and due to the default configuration of Guzzle, where timeout is 0, it will wait indefinitely for a connection. Our cron scripts were hanging around for days before we realized.
Might it be smart to add a reasonable timeout for the network calls?
Where can I found API documentation? I hav eto prepare integration with Swedbank, but with Python application. I got only link to this repo, and documentation "Swedbank Payment Portal PHP Library Documentation", but now I have to do reverse engineering. WIll be much easier to have documentation of "raw" API.
Seems following code is not complete (pointless variable):
https://github.com/Swedbank-SPP/swedbank-payment-portal/blob/master/src/CC/HPSService/HPSService.php#L311
If user attempted at least one authorization and it failed, code will assume this transaction failed. Was this behavior intended?
The SPP documentation does not state that the developer has to take any security measures into account when implementing UrlCallbacks.
Let's say a hacker is eavesdropping traffic between merchant's e-shop <-> SPP and get's the information about orderId and UrlCallback URL. So marking the payment to SUCCESS in merchant's system is a matter of one HTTP POST request.
One way to increase security would be to pass a signature with each UrlCallback URL so that the signature check mechanism is only known to the merchant.
I suggest you to update the SPP documentation's security section.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.