Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Sms Payment Bundle Laravel Package

ernestre/sms-payment-bundle

View on GitHub
Deep Wiki
Context7

Symfony Paysera SMS Payment Bundle.

Build Status

This bundle uses webtopay/libwebtopay library for accepting sms payments via Paysera payment gateway.

Install

composer require ernestre/sms-payment-bundle

Configuration

  • Add bundle to app/AppKernel:
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Ernestre\PaymentBundle\ErnestrePaymentBundle(),
            // ...
        );
    }
    // ...
}
  • Add routes:
ernestre_payment:
    resource: "@ErnestrePaymentBundle/Controller/"
    type:     annotation

  • Add configuration:
ernestre_payment:
  project:
    id:             123 # Your project id
    sign_password:  123 # Your project's sign password
  • Configure sms callback route to /sms-callback in your Paysera project settings.

Usage

After each received payment, SmsPayment entity is created and saved to the database.

Then SmsPaymentReceivedEvent event is dispatched containing the SmsPayment entity with all the payment information.

Then the action sends NOSMS response. ( Detailed information about response messages can be found here . )

Your job is to create a listener which listens to smsPayment.received event and do what ever you need with the payment information.

However, using the NOSMS response message requires you to send a payment confirmation message back to the Paysera serivce. You can use ernestre_payment.sms_payment.answer_sender service to generate this response message. Service's send method requires the SmsPayment entity and response text (which will be sent to the client). The response text can be used to send some king of code (i.e. discount coupon) to the client.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings