Trouble with Annual Recurring Payment

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 years ago
I'm having some trouble with the recurring payment type product in nop 2.7.  First and foremost, let me say that I did a massive import using SQL and CSV files from a Wordpress website (SQL posted below).  In a nutshell, we have an annual membership that many members purchased a long time ago.  

I'm trying to get the data moved into nop and have done OK so far, but when I go to the Orders in My Account, I see the original order, but the Next payment date is the same value as the Start Date.  In trying to figure out where the Next Payment date was coming from, I went into the DB and updated the [nop].[dbo].[RecurringPayment].[StartDateUtc] to a value 1 year from today and both Start date and Next payment updated to the same value on the website.  

Can someone help me figure out how to update these orders for recurring payments to occur 1 year from the date they were purchased?  I have the product setup with Cycle Length = 1, Cycle Period = Years, Total Cycles = 100.


INSERT INTO [Order]
           ([OrderGuid]
           ,[CustomerId]
           ,[BillingAddressId]
           ,[OrderStatusId]
           ,[ShippingStatusId]
           ,[PaymentStatusId]
           ,[PaymentMethodSystemName]
           ,[CurrencyRate]
           ,[CustomerTaxDisplayTypeId]
           ,[OrderSubtotalInclTax]
           ,[OrderSubtotalExclTax]
           ,[OrderSubTotalDiscountInclTax]
           ,[OrderSubTotalDiscountExclTax]
           ,[OrderShippingInclTax]
           ,[OrderShippingExclTax]
           ,[PaymentMethodAdditionalFeeInclTax]
           ,[PaymentMethodAdditionalFeeExclTax]
           ,[OrderTax]
           ,[OrderDiscount]
           ,[OrderTotal]
           ,[RefundedAmount]
           ,[RewardPointsWereAdded]
           ,[CustomerLanguageId]
           ,[AllowStoringCreditCardNumber]
           ,[PaidDateUtc]
           ,[Deleted]
           ,[CreatedOnUtc])
SELECT NEWID(), [Customer].Id, 1,30,10,30,'Payments.Manual',
1.00000000,10,89.9900,89.9900,0.0000,0.0000,0.0000,0.0000,
0.0000,0.0000,0.0000,0.0000,89.9900,0.0000,0,1,1,
[Customer].CreatedOnUtc,0,[Customer].CreatedOnUtc
FROM [Customer]
WHERE [Customer].Id in (SELECT Customer_Id
        FROM [Customer_CustomerRole_Mapping]
        WHERE
          CustomerRole_Id =
            (SELECT [CustomerRole].Id
              FROM [CustomerRole]
              WHERE [CustomerRole].Name = 'Paid Member')
            )
GO

INSERT INTO [RecurringPayment] (CycleLength,CyclePeriodId,TotalCycles,
    StartDateUtc,IsActive,Deleted,InitialOrderId,CreatedOnUtc)
SELECT
1,30,100,PaidDateUtc,1,0,Id,CreatedOnUtc
FROM [Order]
GO

INSERT INTO [OrderProductVariant]
    ([OrderProductVariantGuid],[OrderId],[ProductVariantId]
      ,[Quantity],[UnitPriceInclTax],[UnitPriceExclTax]
      ,[PriceInclTax],[PriceExclTax],[DiscountAmountInclTax]
      ,[DiscountAmountExclTax],[DownloadCount],[IsDownloadActivated])
SELECT NEWID(),[Order].Id,53,
  1,89.9900,89.9900,
  89.9900,89.9900,0.000,
  0.000,0,0
FROM [Order]
GO

Many thanks to anyone who can help me figure this one out...been stuck on this for hours now :(.  I got all the member accounts migrated, roles setup, addresses and even the Generic Attributes, but this one is just driving me nuts.

Thanks and happy coding!

Sean
11 years ago
Guess I made my first post too long :).  In short, is anyone else having a problem where products marked for recurring payment on an annual schedule show the same date for the start date and next payment date?

Thanks!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.