Skip to content
Advertisement

Implement Payum/Laravel recurring payment

I have some issues trying to get this working, I’ve implemented the checkout express (or seems to be) successfully, but also my system needs subscription option, following this example.

Now, my problem is that in Laravel you cannot simply put some random files, so I’m trying to do it in the correct way, sadly, there is no documentation of the classes and methods including on the library.

I’ve created some functions within controllers (I don’t know if this the right way) the problem I’m facing now is trying to createRecurringPayment() to apply the desired amount of the recurring payment, is the final step I guess.

Thanks for yout help.

  • app/controllers/PaypalController.php

    JavaScript
  • app/routes.php

    JavaScript

Advertisement

Answer

I have found the problem. It is with the parameters we pass to the create recurring payment function. Here are functions for agreement and payment creation. It should work fine.

JavaScript

The routes:

JavaScript

Simply open www.example.com/paypal/agreement and it should take you to PayPal

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement