Unzer API PHP SDK is provided with example payment integrations
To enable the examples:
- Navigate to the examples folder, open the
_enableExamples.phpfile, and change the constant
true. You should disable it again as soon as you launch your application.
- You may need to adapt the constant
UNZER_PAPI_FOLDERto match the your folder structure. for example,
- Set the keypair constants
UNZER_PAPI_PUBLIC_KEYto valid values. To learn more how you can get a valid keypair or use your own sandbox keys, go to the Getting started section.
To use the examples go to the examples folder, for example
https://my-server.de/sdk-test/vendor/unzerdev/php-sdk/examples/ and choose the payment method you want to try out.
The examples provide a generic handler ‘examples\ReturnController.php’ which shows the handling of the initial transactions of most payment types in one place.