-
Notifications
You must be signed in to change notification settings - Fork 66
2 important Paypal variables missing from the package #82
Comments
I stumbled upon the same thing, tried adding a custom variable unsuccessfully. Also tried using invoice-number but got an odd payment error "Payment could not be executed". |
Angulz, I have to admit I have struggled a lot on this, and I hope this will help you. On my paypal form page(front end), I added both the user id and invoice number together with a separator as:
the "-" separator will be super useful in the back end the this.uid is my user id from the Vue storage. In the paypal ipn side(backend) I receive the $request->invoice data from my Laravel controller and split it back into 2 separate variables as:
By doing this, you can then separate both your user id and Invoice id. I have honestly scratched my head for days trying to figure out why I could not pass my custom data, or user id and more, now it works. At least if the script change in itself, it is pretty safe because Paypal will always use the invoice id form parameter. This is my Paypal button with the parameter:
@payment-completed="paymentCompleted($event)"
|
Wow, this really helped! I think what I was missing was the PayPal notify-url prop, that was giving me the error. That made the invoice number work (as for the errors), on my backend however, thanks to you I can now get my user ID haha. Super useful, cheers! |
You are more than welcome, I struggled so much on this that I thought....let's not have someone else struggling too :-) Glad it helped. |
Hello,
I would like to inform you that 2 important variables are missing from your package(unless I missed something):
:custom and :item_number1
When an app is detached from the backend, it is good to have them to pass the user id for example. Right now I will be using instead the invoice number but is it not ideal.
Thank you for the package.
The text was updated successfully, but these errors were encountered: