Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation #4

Open
douglas-srs opened this issue Jan 17, 2018 · 3 comments
Open

Documentation #4

douglas-srs opened this issue Jan 17, 2018 · 3 comments

Comments

@douglas-srs
Copy link

Hey there,

I would like to use your extension on my project but I didn't find any documentation available, can you provide me some examples on how to implement this?

@SilverFire
Copy link
Member

SilverFire commented Jan 17, 2018

Hello.

In order to use this module, add it to your application config as follows:

'modules' => [
        // ...
        'merchant' => [
            'class' => \hiqdev\yii2\merchant\Module::class,
            'returnPage' => '/finance/pay/return', // The route to page where user will be redirected after the success transaction
            'notifyPage' => '/finance/pay/notify', // The route that can be used by merchant to send payment notifications
            'finishPage' => '/finance/bill', // The page where the user will be redirected after waiting for transaction completion on success page
            'purchaseRequestCollectionClass' => your\app\PurchaseRequestCollection::class, // The class that extends `\hiqdev\yii2\merchant\Collection` and provides list of possible deposit requests that should be rendered as buttons.
        ],
]

Example of PurchaseRequestCollection you can find here.

Despite we use this project it in our production for more than 5 months, it's still quite unstable and we can not guarantee any backward compatibility. It case you still would like to use this extension, we recommend you to rely on some commit explicitly to prevent unexpected changes of behavior.

@SilverFire
Copy link
Member

You will also need to implement hiqdev\yii2\merchant\transactions\TransactionRepositoryInterface to store information about payment transactions initiated by user, and register the implementation in DIC as a singleton. See example of configuration and implementation itself

@SilverFire
Copy link
Member

Unfortunately, we don't have enough time to write documentation for this project.
In case you have any exact questions – post them, we will try to answer you asap. Maybe, it will result in a documentation issue that may be organized to a complete manual :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants