PHP code example of hochstrasserio / wirecard-bundle
1. Go to this page and download the library: Download hochstrasserio/wirecard-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hochstrasserio / wirecard-bundle example snippets
// AppKernel.php
$bundles = [
…
new Hochstrasser\WirecardBundle\HochstrasserWirecardBundle(),
…
];
use Hochstrasser\WirecardBundle\Event\ConfirmPaymentEvent;
$listener = function (ConfirmPaymentEvent $event) {
// Response parameters
// See: https://guides.wirecard.at/response_parameters
$data = $event->getData();
if ($event->isPaymentState(ConfirmPaymentEvent::SUCCESS)) {
// We got the payment, queue order confirmation email
} else if ($event->isPaymentState(ConfirmPaymentEvent::FAILURE)) {
// Notify the user that something went wrong with the payment, and order
// is on hold
}
};
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.