Giter Site home page Giter Site logo

Comments (3)

samuraee avatar samuraee commented on August 11, 2024

There is no method setReferenceId in Tartan\Larapay\Models\LarapayTransaction class! Where is this method in your reported issue comes from!!!
See: LarapayTransaction.php

from laravel-online-payment.

amin98362 avatar amin98362 commented on August 11, 2024

There is "setReferenceId" method in TransactionInterface that LarapayTransaction implements TransactionInterface.
I replaced "LarapayTransaction.php" you mentioned with "LarapayTransaction.php" that I have in "tartan/laravel-online-payment": "^7.0" but still I get error.
When I call index method in BankController I get this error:

`<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Tartan\Larapay\Models\Enum\Bank;
use App\User;

class BankController extends Controller
{
public function index()
{
//your logic and prepare your order
// ...
$user = User::find(142);
//if you implement getAmount() method you can set amount to null
$amount = 1200000; //Rial at least 1000
//order or user description
$description = 'I pay my order with Larapay <3';
//some additional data that you need store on transaction
$additionalData = [];
//create transaction
$transaction = $user->createTransaction(Bank::MELLAT, $amount, $description, $additionalData);

    //auto submit bank form and transfer user to gateway
    $autoSubmit = true;
    //callback route name. if you set it on your .env file you can set this to null
    $callbackRouteName = 'payment.callback';
    //adapter config
    $adapterConfig = [];
    //generate bank form
    $form = $transaction->generateForm($autoSubmit, $callbackRouteName, $adapterConfig);
    
    return view('go-to-bank',[
        'form' => $form,
    ]);
}

}`

I Use Payable trait in User model.

from laravel-online-payment.

samuraee avatar samuraee commented on August 11, 2024

Fixed at new release v7.0.8, Please check again.

from laravel-online-payment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.