laravel-paddle icon indicating copy to clipboard operation
laravel-paddle copied to clipboard

Support vendors in blade directive and Request

Open Djuki opened this issue 3 years ago • 0 comments

I mentioned this feature in #28.

I added support for multi vendors via configuration in Request:

Usage:

Paddle::product()
        ->generatePayLink([
            'vendor_id' => '44334',
            'vendor_auth_code' => 'fdfsdfsdf'
        ])
        ->productId('5345')
        ->send();

Also, I added support for multi vendors in blade directive:

@paddle(123)

Both changes are covered in unit tests. What have left is to add support for verifySignature in WebhookController, but only this method can support overloading public_key from config, not the controller because I think we can't support multi-vendors in that case. Users need to create own controllers because they know where from they will read public_key.

We can discuss Do we want to change WebhookController or not.

Djuki avatar Feb 22 '22 11:02 Djuki