Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Importing from Error File

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
cowdogman2



Joined: 08 Mar 2018
Posts: 13

PostPosted: Fri Mar 16, 2018 6:23 pm    Post subject: Importing from Error File Reply with quote

At part of testing IPN.NET I have been trying to import into License Tracker the XML attachments to the "Payment Notification" and "Payment Error" emails generated by IPN.NET. Below is the xml I have input into the "Sale Import" section of the Add/Edit Distributor dialog. It's based on the xml supplied by Infralution--only changes are to remapping some of the fields.

Code:
<xml>
<Importer>
  <EmailSubject>Payment Notification</EmailSubject>
  <EmailFolder></EmailFolder>
  <DateFormat>
    <string>HH:mm:ss MMM dd, yyyy PDT</string>
    <string>HH:mm:ss MMM dd, yyyy PST</string>
  </DateFormat>
  <PurchaseTag>Payment</PurchaseTag>
  <PurchaseReferenceTag>txn_id</PurchaseReferenceTag>
  <PurchaseDateTag>payment_date</PurchaseDateTag>
  <CustomerTag>Transaction</CustomerTag>
  <SalutationTag></SalutationTag>
  <LastNameTag>last_name</LastNameTag>
  <FirstNameTag>first_name</FirstNameTag>
  <CompanyTag></CompanyTag>
  <EmailTag>payer_email</EmailTag>
  <PhoneTag></PhoneTag>
  <FaxTag></FaxTag>
  <AddressTag></AddressTag>
  <Street1Tag>address_street</Street1Tag>
  <Street2Tag></Street2Tag>
  <StateTag>address_state</StateTag>
  <CityTag>address_city</CityTag>
  <ZipTag>address_zip</ZipTag>
  <CountryTag>address_country</CountryTag>
  <PurchaseItemTag>item_name1</PurchaseItemTag>
  <ProductReferenceTag>item_number1</ProductReferenceTag>
  <QuantityTag>quantity1</QuantityTag>
  <TotalPriceTag>TotalPrice</TotalPriceTag>
  <UpgradeTag>Upgrade</UpgradeTag>
  <TrueValue>True</TrueValue>
  <FalseValue>False</FalseValue>
  <LicenseKeyTag>LicenseKeys</LicenseKeyTag>
  <LicenseKeyDelimiter>;</LicenseKeyDelimiter>
</Importer>


And below is a sample of the xml attachment from the IPN.NET generated emails. I think I have mapped the fields correctly, but I receive an error at "payer_email" when trying to import.



Quote:
<xml>
<Payment>
<PostData>
<mc_gross>120.00</mc_gross>
<protection_eligibility>Eligible</protection_eligibility>
<address_status>confirmed</address_status>
<item_number1>SLP</item_number1>
<payer_id>SJVJC7C4NDMW2</payer_id>
<address_street>1 Main St</address_street>
<payment_date>16:16:12 Mar 15, 2018 PDT</payment_date>
<payment_status>Completed</payment_status>
<charset>windows-1252</charset>
<address_zip>95131</address_zip>
<first_name>Bugs</first_name>
<mc_fee>3.78</mc_fee>
<address_country_code>US</address_country_code>
<address_name>Bugs Johnson's Test Store</address_name>
<notify_version>3.9</notify_version>
<custom>
<payer_status>unverified</payer_status>
<business>brad@lavastrings.com</business>
<address_country>United States</address_country>
<num_cart_items>1</num_cart_items>
<mc_handling1>0.00</mc_handling1>
<address_city>San Jose</address_city>
<verify_sign>Af6V3k0Meuee4r2R25rdewhinpPuAqkA6JVo7uk2E0GuOSEMpva46ZMt</verify_sign>
<payer_email>bugs@studioclerk.com</payer_email>
<txn_id>29M72910XS6228205</txn_id>
<payment_type>instant</payment_type>
<payer_business_name>Bugs Johnson's Test Store</payer_business_name>
<last_name>Johnson</last_name>
<address_state>CA</address_state>
<item_name1>Sample Licensed Product</item_name1>
<receiver_email>brad@lavastrings.com</receiver_email>
<payment_fee>3.78</payment_fee>
<quantity1>1</quantity1>
<receiver_id>C7YHMBA3BPGAA</receiver_id>
<txn_type>cart</txn_type>
<mc_gross_1>120.00</mc_gross_1>
<mc_currency>USD</mc_currency>
<residence_country>US</residence_country>
<test_ipn>1</test_ipn>
<transaction_subject>
<payment_gross>120.00</payment_gross>
<ipn_track_id>4b3ff4dff26c1</ipn_track_id>
</PostData>
</Payment>


Any idea why this is erroring at import?

Thanks.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Mar 18, 2018 2:36 am    Post subject: Reply with quote

Normally for sales via IPN.NET you would not need to import from an XML file - since you import directly from the server using the IPN.NET > Import Data from Server menu.

Prior to Version 3 of IPN.NET you did import from the XML file that was emailed to you - but this changed in Version 3 to use the current direct import mechanism. The IPN Sales Importer definition was left in place even though it is no longer really used. It looks like there have been some changes to the format of the XML data emailed to you which means that importing using that mechanism no longer works.

If a sale does not have errors then you should just be able to use the direct import mechanism. If you got a Payment Error and still want to be able to import the customer data from the XML file then changing the Sale Import definition for your PayPal distributor to the following should enable you to do this.

Code:
<?xml version="1.0" encoding="utf-16"?>
<Importer xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="XmlSalesImporter">
  <EmailSubject>Payment Notification</EmailSubject>
  <EmailFolder>\Personal Folders\Inbox</EmailFolder>
  <DateFormat>
    <string>HH:mm:ss MMM dd, yyyy PDT</string>
    <string>HH:mm:ss MMM dd, yyyy PST</string>
  </DateFormat>
  <PurchaseTag>Payment</PurchaseTag>
  <PurchaseReferenceTag>PostData/txn_id</PurchaseReferenceTag>
  <PurchaseDateTag>PostData/payment_date</PurchaseDateTag>
  <CustomerTag>PostData</CustomerTag>
  <SalutationTag></SalutationTag>
  <LastNameTag>last_name</LastNameTag>
  <FirstNameTag>first_name</FirstNameTag>
  <CompanyTag></CompanyTag>
  <EmailTag>payer_email</EmailTag>
  <PhoneTag></PhoneTag>
  <FaxTag></FaxTag>
  <AddressTag></AddressTag>
  <Street1Tag>address_street</Street1Tag>
  <Street2Tag></Street2Tag>
  <StateTag>address_state</StateTag>
  <CityTag>address_city</CityTag>
  <ZipTag>address_zip</ZipTag>
  <CountryTag>address_country</CountryTag>
  <PurchaseItemTag>Item</PurchaseItemTag>
  <ProductReferenceTag>Name</ProductReferenceTag>
  <QuantityTag>Quantity</QuantityTag>
  <TotalPriceTag>TotalPrice</TotalPriceTag>
  <UpgradeTag>Upgrade</UpgradeTag>
  <TrueValue>True</TrueValue>
  <FalseValue>False</FalseValue>
  <LicenseKeyTag>LicenseKeys</LicenseKeyTag>
  <LicenseKeyDelimiter>;</LicenseKeyDelimiter>
</Importer>

_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
cowdogman2



Joined: 08 Mar 2018
Posts: 13

PostPosted: Sun Mar 18, 2018 6:28 pm    Post subject: Reply with quote

That worked. Thanks. Understood about using the Import Sales from IPN.NET button--I just wanted a backup method that didn't involve manually entering the data.

I have noticed the Sale Date and Date Issued times in License Tracker don't match up. For example a sale logged at 18 Mar 18 09:45 but the issue datetime for the license is 18 Mar 18 08:45, with the 8:45 being the correct sale time/local time for me (Pacific Daylight Savings). The sale xml file also shows 08:45:45 Mar 18, 2018 PDT. My host also uses PDT.

Just doing a spot check of various sales it looks like either (1) the sale time is an hour later than the (correct) license issue time or (2) the times are the same but an hour later than actual PDT time.

Is there a setting somewhere for this?

Maybe this is an aberration for a couple weeks each Spring and Fall when the US has sprung forward early?? But that would not explain (I think) why sometimes the sale/license issue times match and sometimes they don't.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Mar 19, 2018 3:52 am    Post subject: Reply with quote

The sale date/time is based the Date Time recorded by PayPal for the transaction where as the License Key issue date is date time on the IPN.NET Server. Looks like the code may not be coping with the difference between PDT and PST. We will take a look at this
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
cowdogman2



Joined: 08 Mar 2018
Posts: 13

PostPosted: Mon Mar 19, 2018 3:26 pm    Post subject: Reply with quote

Thanks. I didn't work thru each sale but it may be that the ones showing both a sale and license time one hour later than actual time may be sales that I manually imported.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group