PHP code example of kpodjison / unicreditpayment

1. Go to this page and download the library: Download kpodjison/unicreditpayment 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/ */

    

kpodjison / unicreditpayment example snippets


    $payManager = new PayManager;
    $uni = new UniCredit([
        'shop_id' => \Ramsey\Uuid\Uuid::uuid4()->toString(),
        'amount' =>100,
        'shopUserRef' => '[email protected]',
        "info1" => 'paymentinfo1',  //optional parameter
        "info2" => 'paymentinfo2',  //optional parameter
        "info3" => 'paymentinfo3',  //optional parameter
        "info4" => 'paymentinfo4',  //optional parameter
    ]);
    return response()->json($payManager->pay($uni)); //returns redirectUrl,paymentID,shopID to be used for payment verification


  $verify = new Verify([
            'shop_id' => 'fa37729dd-737c-4122-b53e-771c8f91a2aa',
            'payment_id' =>"002580908057104525647",
        ]);
        return response()->json($verify->verifyPay()); //return success url