Announcement

Collapse
No announcement yet.

Digital Download Payment Problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Digital Download Payment Problems

    I am starting a new thread on this. To reiterate what I have said on another thread: We are going to start selling a small amount of digital downloads, which will only account for a very small number of sales in our online shop. As it stands customers will be able to choose a deferred payment method and still receive the download link, it is not an option to remove these payment methods (which include gift voucher, send CC details separately, paying by cheque).

    I need the following:

    if (digital download)
    then {payment by card option only};
    else {all options};

    I tried the soloution posted here but unfortunately it didn't work for me. All attempts to add to basket resulted in an internal error message. Interestingly enough it also threw the same error when trying to search on the site, view basket or checkout whilst the modified GeneralValidPayments file was active. It is fine again now I have reinstated the original file.

    I would appreciate any help you can provide.

    Many thanks.
    Karen
    Kind Regards
    Karen

    Charmed Cards & Crafts

    #2
    Hi Karen,

    That previous script change isn't quite right for v7. Use that but then also make the following changes to it:

    Change...

    @Response = ACTINIC::GetDigitalContent($pCartList);

    to...

    @Response = ACTINIC::GetDigitalContent($pCartList, $::TRUE);

    And change...

    ($nMethodID == 10005))

    to...

    ($nMethodID != 10005))
    ********************
    Tracey
    SellerDeck

    Comment


      #3
      Oh thank you Tracey. I will give this a try, fingers crossed

      Kind Regards
      Karen
      Kind Regards
      Karen

      Charmed Cards & Crafts

      Comment


        #4
        OK that didn't work. I still get error 500 Internal server error when trying to add to basket (or search etc). This is my function after your suggested modification (I am reinstating the original file for the time being as I need the site fully functional):

        sub GenerateValidPayments
        {
        my ($parrMethods, $bValidateDelivery) = @_;
        if (!defined $bValidateDelivery)
        {
        $bValidateDelivery = $::FALSE;
        }
        my @arrFullList = @{$$::g_pPaymentList{'ORDER'}};
        my %Lookup = GetPaymentsForLocation($bValidateDelivery);
        my $nMethodID;
        my $bOnlyCC = $::FALSE;
        my @Response = $::Session->GetCartObject();
        if ($Response[0] == $::SUCCESS)
        {
        my $pCartObject = $Response[2];
        my $pCartList = $pCartObject->GetCartList();

        @Response = ACTINIC::GetDigitalContent($pCartList, $::TRUE);
        $bOnlyCC = ((scalar (keys %{$Response[2]}) > 0)) ? $::TRUE : $::FALSE;
        }
        foreach $nMethodID (@arrFullList)
        if ($bOnlyCC &&
        ($nMethodID != 10005))
        {
        next;
        }
        {
        if ($$::g_pPaymentList{$nMethodID}{ENABLED}) # if the method is enabled
        {
        #
        # Is there any location dependency?
        #
        if ( $::g_pLocationList->{EXPECT_PAYMENT} && # if so look up the allowed payments
        !$Lookup{$nMethodID}) # check for availability
        {
        next; # and skip if not available
        }
        push (@$parrMethods, $nMethodID); # add to valid payments else
        }
        }
        #
        # Add default payment method for business customers
        # if it isn't in the list
        #
        my $sDigest = $ACTINIC::B2B->Get('UserDigest');
        if ( $sDigest )
        {
        my @Response = ActinicOrder::GetAccountDefaultPaymentMethod($sDigest);
        if ($Response[0] != $::SUCCESS)
        {
        return(@Response);
        }
        if (!$Lookup{$Response[2]}) # if the method is
        {
        push (@$parrMethods, $Response[2]);
        }
        }
        }

        Again I would appreciate any help you can provide.

        Many Thanks and Kind Regards
        Karen
        Kind Regards
        Karen

        Charmed Cards & Crafts

        Comment


          #5
          Hi Karen,

          There's a '{' in the wrong place in your code. Try using this for this:

          sub GenerateValidPayments
          {
          my ($parrMethods, $bValidateDelivery) = @_;
          if (!defined $bValidateDelivery)
          {
          $bValidateDelivery = $::FALSE;
          }
          my @arrFullList = @{$$::g_pPaymentList{'ORDER'}};
          my %Lookup = GetPaymentsForLocation($bValidateDelivery);
          my $nMethodID;

          my $bOnlyCC = $::FALSE;
          my @Response = $::Session->GetCartObject();
          if ($Response[0] == $::SUCCESS)
          {
          my $pCartObject = $Response[2];
          my $pCartList = $pCartObject->GetCartList();

          @Response = ACTINIC::GetDigitalContent($pCartList, $::TRUE);
          $bOnlyCC = ((scalar (keys %{$Response[2]}) > 0)) ? $::TRUE : $::FALSE;
          }

          foreach $nMethodID (@arrFullList)
          {

          if ($bOnlyCC &&
          ($nMethodID != 10005))
          {
          next;
          }

          if ($$::g_pPaymentList{$nMethodID}{ENABLED}) # if the method is enabled
          {

          #
          # Is there any location dependency?
          #
          if ( $::g_pLocationList->{EXPECT_PAYMENT} && # if so look up the allowed payments
          !$Lookup{$nMethodID}) # check for availability
          {
          next; # and skip if not available
          }
          push (@$parrMethods, $nMethodID); # add to valid payments else
          }
          }
          #
          # Add default payment method for business customers
          # if it isn't in the list
          #
          my $sDigest = $ACTINIC::B2B->Get('UserDigest');
          if ( $sDigest )
          {
          my @Response = ActinicOrder::GetAccountDefaultPaymentMethod($sDigest);
          if ($Response[0] != $::SUCCESS)
          {
          return(@Response);
          }
          if (!$Lookup{$Response[2]}) # if the method is
          {
          push (@$parrMethods, $Response[2]);
          }
          }
          }
          ********************
          Tracey
          SellerDeck

          Comment


            #6
            Thank you so much Tracey, that seemed to work. Just need to change the payment number as I must have modified that when I set up the site.

            Thanks again, I truly appreciate your help.

            Kind Regards
            Karen
            Kind Regards
            Karen

            Charmed Cards & Crafts

            Comment


              #7
              Tracey

              I am having a similar problem that this post doesn't resolve... It's in V8 and I have posted in the V8 forum but I haven't had any response and unfortunately it's rather urgent...

              I need TWO payment methods to allow visibility of digital downloads in the receipt: credit cards with PROTX and Paypal payments standard (not Pro).

              I do not want visibility of downloads for payments by cheque (set up using 'invoice with payment and delivery') and 'credit cards sent separately'.

              Can you help?!?!?

              Thanks

              Dave

              Comment


                #8
                Hi Dave,

                I'll have to put this to our development team as it's a perl change.
                ********************
                Tracey
                SellerDeck

                Comment


                  #9
                  Hi Dave,

                  Use the above code but change:

                  if ($bOnlyCC &&
                  ($nMethodID != 10005))
                  {
                  next;
                  }


                  to:

                  if ($bOnlyCC &&
                  ($nMethodID != 22 && $nMethodID != 900))
                  {
                  next;
                  }

                  where '22' is the ID for 'Protx' and '900' is the ID for 'Paypal' (can be checked in the 'PaymentMethods' table in the database).
                  ********************
                  Tracey
                  SellerDeck

                  Comment


                    #10
                    Thanks a million TraceyG!!!

                    Comment

                    Working...
                    X