Shipping & sales tax in paypal order details

Permalink 2 users found helpful
Howdy guys,
I've integrated paypal payment standard in my site. It works properly, but I want to show the shipping & sales tax separately in paypal order details section. Currently it shows only total value (original price + shipping + sales tax). The screenshot is attached.

Please help me.

Citytech

1 Attachment

citytech2
 
citytech2 replied on at Permalink Best Answer Reply
citytech2
Done by myself. Just add few lines & it works fine.
I've added the below code to controller.php of the paypal_payment_standard package.

I've added the below code inside public function form() {
$fields = array_merge($fields, $this->getProductFields($o));
$fields = array_merge($fields, $this->getOrderFields($o));
$fields['upload'] = 1;


and change the below code:
previously it looks like this
$fields['cmd'] = '_xclick';

Now it looks like this:
$fields['cmd'] = '_cart';


Now at the outside of the public function form() {//code} I put some code mentioning below:
private function getOrderFields($o) {
      $fields = array();
      /* Get the tax rates so we can pick sales tax out of the line items */
      Loader::model('sales/tax/rate', 'core_commerce');
      $tr = CoreCommerceSalesTaxRate::getList();
      $taxrates = array();
      foreach ($tr as $taxrate) {
         $taxrates[$taxrate->getSalesTaxRateName()] = $taxrate;
      }
        /* Get the list of discounts so we can pick discounts out of the line items */
        $d = CoreCommerceDiscount::getList();
        $discounts = array();
        foreach ($d as $discount) {
            $discounts[$discount->getDiscountName()] = $discount;
        }


Citytech