-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Add PayPal/gateway line item details #154
Conversation
Hi Adrian, can you help. I'm unsure where to set items. I see it says request, but I cant find the equivalent in the sagepay in frame code I am using. |
I don't think line items are supported on the sagepay gateway yet sorry. |
Sagepay allow passing line items as basket information. I would have a go at it, but not sure where to start. |
I can see that in sagepay abstract request that getItemData would need to cycle through the item bag to produce a 'basket' parameter within $data (i think) to match their example:
And that I would need to edit the auth request and complete request files to merge that into the data array.. But In my code I would be unsure where to use it. I.e. I instantiate a serverGateway class, but need to call the setItems method on a request class.. Edit: |
I've just raised a ticket concerning the cart item implementation - I cannot see a way to add custom fields, such as the Net and VAT fields in the SagePay example. Not sure if I've raised it against the right repository, so here it is: thephpleague/omnipay-common#11 @benjam-es I am trying out the basket like this:
My problem is that the basket can only consist of name/quantity/price and nothing more, which limits it pretty much to just PayPal. A gateway could override the Item class to add its own setters and getters, but that defeats the object of having a unified API to learn. |
How do I view these items on PayPal history? |
I'm working on passing line item details to PayPal (and other gateways which support this - see #32) and looking for feedback on the API.
It currently looks like this:
Similar to the CreditCard object, you can either pass an array and have the ItemBag object instantiated for you, or you can pass the actual item and it will be used.
Feedback welcome.