mc12345678:
Couple of things.
- looks like you haven't updated your wepay software. There is a version 2.0 out there, that includes more options.
- Wepay offers to include shipping fees into the amount requested. I haven't found the ZC variable that represents the calculated shipping fee yet; however, you would need to add a line similar to this in the shopdirectory/includes/modules/payment/wepay_checkout.php file in the pre_confirmation_check() function as part of the
code that starts:
try {
$checkout = $wepay->request('/checkout/create', array('account_id' => $account_id , // ID of the account that you want the money to go to
>
> Recommend that somewhere before the last line you add:
>
> ```
'shipping_fee' => $ShippingFeeAmount , // The variable ShippingFeeAmount is generically provided here and needs to be replaced by the variable that represents ZC's calculated shipping fee. More to follow if someone doesn't provide an answer here faster than I can find it.
On second thought, it looks like version 2 includes $orderamount = $order->info['total'] and by review of ZC code, it appears that $order->info['total'] is = $order->info['sub_total'] + $order->info['shipping_cost'], but if under version 2.0 your customer(s) are not being charged the shipping fee(s) at this point in the process of making the payment then the variable $orderamount should have $order->info['shipping_cost'] added to it.
But with the new version of WePay, you should be covered now... If you would like to provide the purchaser more information on WePay then in the above you can keep the variable that I defined, but before the "try { " statement add:
$ShippingFeeAmount = $order->info['shipping_cost']
Personally, I would think that should be passed to WePay anyways so that the customer is able to see on WePay what the different costs are that make up the total. WePay expects to receive the total dollar amount that the customer is being charged, so this additional statement does not appear that it will affect the total dollar amount, only that WePay will be able to identify that a fee had been applied. (Didn't dig deeply into the API documentation to identify the truth of that, but deduced it from https://www.wepay.com/developer/reference/checkout#create).
Good luck, hope that you got your software updated.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...