PHP code example of jjcaicedo / place-to-pay

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

    

jjcaicedo / place-to-pay example snippets


//using illuminate migrations
Schema::create('payments', function (Blueprint $table) {
    $table->increments('id');
    $table->string('status');
    $table->string('transaction_id');
    $table->timestamps();
});

$auth = new \JJCaicedo\PlaceToPay\Models\Authentication(<Place to pay AuthId>, <Place to pay TranKey>, <Additional Data>|null);
\JJCaicedo\PlaceToPay\PlaceToPay::connect($auth, <Soap wdsl url>);

$transactionResponse = \JJCaicedo\PlaceToPay\PlaceToPay::createTransaction(<PSETransactionRequest>);//If it works Payment status Sent

$transactionInformation = \JJCaicedo\PlaceToPay\PlaceToPay::getTransactionInformation(<transactionId>); //If it works Payment status to $transactionInformation->transactionState;