[Skip to main content](#vessel-content)

#   PayPal ‘Adaptive Payments’ – ‘Chained Payments’

##

- **[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")**
- [![chris&#95;ab's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/28414-chris-ab "View chris&#95;ab's Profile") Topic Author
- [ Offline](/forum/user/28414-chris-ab)

Less More

- Posts: 11
- Thank you received: 0
-
-

13 years 1 hour ago [\#130257](#130257) by [chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")  *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130257 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")* was created by *[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")*

-- url of the page with the problem -- : [ mywebsite.com/mypage](http://mywebsite.com/mypage)
-- HikaShop version -- : x.x.x
-- Joomla version -- : x.x
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi,
I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.

This is from PayPal App approval people:

> Can you confirm that the seller will be the Primary recipient in the Chained payment &amp; you will collect your fees as Secondary recipient? We will require you to set up the payment in this way so that the seller is the Merchant of Record in the case of any Chargebacks or Refunds. You can always facilitate the refunds by using third party refund API. Please amend your selections in the ‘Services Used by App’ – ‘Adaptive Payments’ – ‘Chained Payments’ area of the submission form to reflect this. Note: You will need to click the App Name in the ‘My Applications' area in order to expand and edit the fields of your submission form.

During testing I see this:

> array(11) {
> \["requestEnvelope"\]=&gt;
> array(1) {
> \["errorLanguage"\]=&gt;
> string(5) "en\_US"
> }
> \["actionType"\]=&gt;
> string(3) "PAY"
> \["currencyCode"\]=&gt;
> string(3) "USD"
> \["receiverList"\]=&gt;
> array(3) {
> \[0\]=&gt;
> array(3) {
> \["email"\]=&gt;
> string(35) "chris-facilitator@antiquesbazar.com"
> \["amount"\]=&gt;
> float(41.99)
> \["primary"\]=&gt;
> string(4) "true"
> }
> \[1\]=&gt;
> array(3) {
> \["email"\]=&gt;
> string(13) "seller@ab.com"
> \["amount"\]=&gt;
> float(9)
> \["primary"\]=&gt;
> string(5) "false"
> }
> \[2\]=&gt;
> array(3) {
> \["email"\]=&gt;
> string(12) "tina1@ab.com"
> \["amount"\]=&gt;
> float(19.![8)](/media/kunena/emoticons/2.png "8)")
> \["primary"\]=&gt;
> string(5) "false"
> }
> }
> \["feePayer"\]=&gt;
> string(13) "SECONDARYONLY"

Indicates that the store owner is Primary as well as the Vendors?

AND

How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 11 months ago [\#130295](#130295) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130295 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Hi,

In the receiver list, you see only one "primary" account (the first one is set with "true", the others with "false").

For the shipping/payment fees, if you asked HikaMarket to split the fees, it will split to the different vendors depending to their cart total percentage. So if the main vendor is not selling any item, he won't pay anything for the shipping/payment fees.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")**
- [![chris&#95;ab's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/28414-chris-ab "View chris&#95;ab's Profile") Topic Author
- [ Offline](/forum/user/28414-chris-ab)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 11 months ago [\#130304](#130304) by [chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")  Replied by *[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130304 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Hi,
Thanks for the response.
I see now how the primary is defined.
This is the opposite of what I want and is recommended by PayPal.

Store owner = A (primary)
Vendor = B (Secondary)
So for instance B lists and sells something for 100
Buyer pays through PayPal to A 100
A pays 90% to B ( chained payment ) A keeps 10% ( commission or listing fee or whatever )
So if Buyer is unhappy and and demands a refund or charge back, A is responsible for 100% of that charge back even though they collected only 10% of the transaction.

This from PayPal:

> so each item will initiate a chained payments. so if they buy 6 items, it will be six payments. the issue with chargebacks is, if you are the primary receiver of a payments for six items, if the buyer is not happen with one of the items, all six items payments will be charged back even the buyer is only questioning about a portion of the payments. this will be very risky. You can also do parallel payments, so the buyer see one payment to six people including you. If he has any question about any of the payment, he can contact that person directly. We definitely don't encourage you to be the primary receiver as you are only keep a small portion of the payment but your PayPal account will be responsible for all chargebacks and refund. You can always using refund API 3rd party permission to facilitate refunds from your merchant's account as you are the app caller and you owns the APP ID. thanks, Xiaolei

Is this something that can be changed? Is there a setting that I am missing?
Can you also include provision to issue refund via API as mentioned?

Thanks,
-Chris

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 11 months ago [\#130309](#130309) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130309 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Hi,

It is not possible to put another account as primary if the other account does not have a special account compatible with "paypal adaptive". I tried and other users test it too, without success.
That's why it's not possible in the plugin to change the primary account, which is always your paypal adaptive account email.

But as paypal said, you can use parallel mode if you want. The plugin is compatible with this mode.
At this moment the customer can see the different vendors.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")**
- [![chris&#95;ab's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/28414-chris-ab "View chris&#95;ab's Profile") Topic Author
- [ Offline](/forum/user/28414-chris-ab)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 11 months ago [\#130512](#130512) by [chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")  Replied by *[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130512 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

> For the shipping/payment fees, if you asked HikaMarket to split the fees, it will split to the different vendors depending to their cart total percentage. So if the main vendor is not selling any item, he won't pay anything for the shipping/payment fees.

This does not seem to work is there another setting that controls this?
The shipping fees are not transferred to the vendor/s.

So the main vendor is not selling any items.
listing/commission is 10%
PayPal adaptive is set to parallel payments.

1 Item in cart price 10.00 + 6.00 shipping.
the split for payments is
main vendor = 7.00
vendor = 9.00

Should be
main vendor = 1.00 ( maybe 1.60 if the commission includes Shipping fees - I think it should not)
vendor = 15.00 (14.40)

So I have tried the combinations of
Split shipping fees No Yes
Shipping per vendor No Yes

Any ideas?

Thanks,
-Chris

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 11 months ago [\#130571](#130571) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130571 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Hi,

And how the shipping fees are displayed in the backend orders ?
Does the sub-order for the vendor have the right shipping fees or are they set to 0 ?

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")**
- [![chris&#95;ab's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/28414-chris-ab "View chris&#95;ab's Profile") Topic Author
- [ Offline](/forum/user/28414-chris-ab)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 11 months ago [\#130576](#130576) by [chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")  Replied by *[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130576 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Hi,
The sub-order displays
Additional information
Subtotal $10.00
Coupon $0.00
Shipping $6.00 - Best Way
Payment fee $0.00 - PayPal
Total $16.00

Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 11 months ago [\#130634](#130634) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130634 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Hi,

So in your sub-order you right have the shipping price.
In the main order, you should see the "total vendor price" including this shipping fees, right ?

The paypal adaptive plugin does not process any special thing in the orders.
It uses the "vendor total prices" for the other vendors and let the rest of the order to the primary account.

So the best is to have a screenshot of your HikaMarket configuration and a screenshot of the order result.
I tried to reproduce your problem in my local website, but I didn't make it.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")**
- [![chris&#95;ab's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/28414-chris-ab "View chris&#95;ab's Profile") Topic Author
- [ Offline](/forum/user/28414-chris-ab)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 11 months ago [\#130761](#130761) by [chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")  Replied by *[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130761 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Hi Jerome,
Here are screen shots of Order, Vendor sub-Order, PayPal Payment, and HikaMarket Configuration.
If you need access to administrator login PM and I will setup a user for you.
If you want to test an order from the front end.
User fred
PW fred

Let me know if you need more info.

- [ ![h4fdef52.png](/forum/attachment/13422) ](/forum/attachment/13422 "h4fdef52.png") [ ](/forum/attachment/13422?download=1 "h4fdef52.png")
- [ ![hc6748e9.png](/forum/attachment/13423) ](/forum/attachment/13423 "hc6748e9.png") [ ](/forum/attachment/13423?download=1 "hc6748e9.png")
- [ ![h2f06822.png](/forum/attachment/13424) ](/forum/attachment/13424 "h2f06822.png") [ ](/forum/attachment/13424?download=1 "h2f06822.png")
- [ ![h4ae2d78.png](/forum/attachment/13425) ](/forum/attachment/13425 "h4ae2d78.png") [ ](/forum/attachment/13425?download=1 "h4ae2d78.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 11 months ago [\#130884](#130884) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130884 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Hi,

If you look at the main order, you see the sub-orders list.
In this table, there is a column "vendor total" which is the total for the vendor (without yours fees).
The total is $9 but for what I understand, it should be $15

So, it is definitively not related to the paypal adaptive plugin but to the process which calculate the vendor total.
I am currently investigating the problem.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 11 months ago [\#130912](#130912) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130912 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Hi,

I wrote some modification but before releasing it, I want to be sure that it will not have side effects.
You can apply this patch manually by modifying the file "administrator/components/com_hikamarket/classes/order.php" and replace: Code:

public function calculateVendorPrice($vendor_id, &amp;$products, &amp;$fees, $coupon = null) {

By: Code:

public function calculateVendorPrice($vendor_id, &amp;$products, &amp;$fees, $coupon = null, $v_order = null) {

Then: Code:

} elseif(bccomp($coupon-&gt;discount_percent_amount, 0, 5) !== 0) { $ret *= floatval((100 - floatval($coupon-&gt;discount_percent_amount)) / 100); } } return $ret; }

By Code:

} elseif(bccomp($coupon-&gt;discount_percent_amount, 0, 5) !== 0) { $ret *= floatval((100 - floatval($coupon-&gt;discount_percent_amount)) / 100); } } if(!empty($v_order)) { if(!empty($v_order-&gt;order_payment_price)) $ret += $v_order-&gt;order_payment_price; if(!empty($v_order-&gt;order_shipping_price)) $ret += $v_order-&gt;order_shipping_price; } return $ret; }

And the last one: Code:

if(empty($order-&gt;cart-&gt;coupon)) $order-&gt;cart-&gt;coupon = null; $shopOrderClass-&gt;recalculateFullPrice($v_order, $v_order-&gt;cart-&gt;products); $v_order-&gt;order_vendor_price = $this-&gt;calculateVendorPrice($vendor_id, $v_order-&gt;cart-&gt;products, $fees, $order-&gt;cart-&gt;coupon);

By Code:

if(empty($order-&gt;cart-&gt;coupon)) $order-&gt;cart-&gt;coupon = null; $shopOrderClass-&gt;recalculateFullPrice($v_order, $v_order-&gt;cart-&gt;products); $v_order-&gt;order_vendor_price = $this-&gt;calculateVendorPrice($vendor_id, $v_order-&gt;cart-&gt;products, $fees, $order-&gt;cart-&gt;coupon, $v_order);

These modification will "push" the shipping and payment fees into the vendor total price.
At this moment, the sub-order will have nicer data.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")**
- [![chris&#95;ab's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/28414-chris-ab "View chris&#95;ab's Profile") Topic Author
- [ Offline](/forum/user/28414-chris-ab)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 11 months ago -  12 years 11 months ago [\#130942](#130942) by [chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")  Replied by *[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130942 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Hi Jerome,
In administrator/components/com_hikamarket/classes/order.php
I can not find Code:

} elseif(bccomp($coupon-&gt;discount_percent_amount, 0, 5) !== 0) { $ret *= floatval((100 - floatval($coupon-&gt;discount_percent_amount)) / 100); } } return $ret; }

I have attached the file from my install.

Last edit: 12 years 11 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 11 months ago [\#130950](#130950) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130950 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Hi,

It is at the end of the function "calculateVendorPrice" just before the function "processShippingParams".

Regards,

PS : Please do not attach HikaMarket files in the forum.

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")**
- [![chris&#95;ab's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/28414-chris-ab "View chris&#95;ab's Profile") Topic Author
- [ Offline](/forum/user/28414-chris-ab)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 11 months ago [\#130972](#130972) by [chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")  Replied by *[chris\_ab](/forum/user/28414-chris-ab "View chris&#95;ab's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130972 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Sorry about the attachment,
OK,
I replaced this (different from what you have below) Code:

} elseif(bccomp($coupon-&gt;discount_percent_amount, 0, 5) !== 0) { $ret *= floatval($coupon-&gt;discount_percent_amount / 100); } } return $ret; }

with Code:

} elseif(bccomp($coupon-&gt;discount_percent_amount, 0, 5) !== 0) { $ret *= floatval((100 - floatval($coupon-&gt;discount_percent_amount)) / 100); } } if(!empty($v_order)) { if(!empty($v_order-&gt;order_payment_price)) $ret += $v_order-&gt;order_payment_price; if(!empty($v_order-&gt;order_shipping_price)) $ret += $v_order-&gt;order_shipping_price; } return $ret; }

Seems to be working,

Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 11 months ago [\#130978](#130978) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[PayPal ‘Adaptive Payments’ – ‘Chained Payments’](/forum/23-market-how-to/863240-paypal-adaptive-payments---chained-payments#130978 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi, I am setting up PayPal ‘Adaptive Payments’ – ‘Chained Payments’ payments using the PayPal plugin.  This is from PayPal App approval people:  During testing I see this:  Indicates that the store owner is Primary as well as the Vendors?  AND  How do I setup Shipping and/or Payments plugins so shipping fees that are charged are payed to the vendor and not retained by store owner? Sorry, I could not find documentation for this.")*

Good ![:)](/media/kunena/emoticons/8.png ":)")

I will continue my investigations, the patch (or something similar) would be in the next release.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODYzMjQwLXBheXBhbC1hZGFwdGl2ZS1wYXltZW50cy0tLWNoYWluZWQtcGF5bWVudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.156 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
