Tuesday, August 04, 2009

Charts and charts (20090803)

Escharts support. Finished the payment handling. Working on the prepayment code - which involves expanding the web page to accommodate a payment provider selection, and underlying code to do what's needed (as per register.aspx) for each payment provider. Currently the page
only supports a single provider - so I need to split out the invoice and order generation code from the page load code, and stick in a couple of post back buttons (one for each provider) and do provider specific stuff in the postback handling code for each button.

Creating a win 2003 server VM, running 2 websites, one for charts.bubble.com and another for escharts.bubble.com.

Monday, August 03, 2009

Callbacks and state variables (20090731)

Matching Worldpay callback code - making sure to exclude/extract code for other operations - cancellations etc.

Slight hiccup in the PayPal/MIS implementation is that as I uncover each requirement from the existing code, and implement it for PayPal/MIS, I discover a bunch more requirements. All of this makes trying to determine how far there is left to go rather difficult.

Worldpay also supports accepting any number of passthrough variables (and values) which the shop code uses to sling a bunch of state data and flags around. PayPal doesn't support this - so all this information will have to be saved into the DB before any call to PayPal. This I will make as generic as possible.

Thursday, July 30, 2009

Extra Subscription info (20090729)

Implemented the PMISProviderData table and class (using nORM) The SetExpressCheckout now saves the provider data, and GetExpressCheckout loads it again.

Also saves the payment id (returned from PP) into the invoice table.

Trying to work out the kinks in specifying a trial period for the PP recurring payment profile - the combination of period (day), frequency (14) and total cycles (1) causes a PP error, about the total cycles having to be bigger than 0 (which it is.) Solved for the meantime by moving the start date to 14 days from now, and removing the trial period.

Tracking down how the mechanics of user service subscriptions work - and what exactly the lifetime is of data in the tblUserServicesSubs table.

Added a separate subscription data table, which gets populated with userid, serviceid and provider id (which in the case of PayPal) is linked to the recurring payment profile.

Wednesday, July 29, 2009

No "Custom" for recurring payments (20090728)

Battling with merging various repositories from Hg - which I've decided I need to do to keep the differences from mounting too much.

Integrating nORM from MUDI2008-parallel, into MUDI2008-mis.

Successfully creates invoices using PMIS for PayPal purchases. Creates an invoice with zero amount for subscription only order.

Having a problem tracking down why PayPal is no longer returning the "Custom" field (which contains our invoice id, cart id etc) and is used by the callback to know which order etc is being dealt with. This was happening yesterday, and isn't happening now - and googling for "getExpressCheckout" and "Custom" doesn't produce anything useful.

Turns out that PP doesn't support the "Custom" field for recurring payment only transactions. Going to have to look at using the PP token (returned from the first PP call) to index a local store of all the information we currently store in the "Custom" field.

Looked at using "SetCustomerBillingAgreement" instead of "SetExpressCheckout" for a recurring payment only transaction, but ignoring it as: 1) The documentation says don't use if for later versions of the API, and 2) It doesn't support the use of "Custom" for recurring payment only transactions.

Wednesday, July 15, 2009

Recurring payments

MIS/PP - discovered that because the paypal website doesn't display payment details to the user, and actually displays a message saying that they will confirm their payment details on the following screen, I will have to jiggle the order of the code a little. Currently, we display the summary to the user (including amounts etc) and the Next button takes them off to PP or WP. We will now have to shift that for PP, send them off to PP, and on the callback return, display that page, and the Next button will finish the PP transaction (the code that is currently in paypal/callback.asp.vb)

Working through code to determine why the instant payment for the service subscription is zeroed, and how we can prevent it for PP users. It only seems to happen if a service subscription is the only invoicable item in the order. Sorted - seems to be something I did - or was looking at the wrong data.

Adding basic recurring payment setup. Need to make changes to setExpressCheckout to set up recurring payments in the first place (not quite sure why - but PP demands it)

Monday, March 02, 2009

Looking for validation (20090302)

Uploading atlas validation data. Then rerunning the atlas validation data generation, as the original only had around 2000 cities in it. And once I discovered that I hadn't been able to update the original atlas data correctly, I managed to get that done, and re-run the validation data generation. Definitely the last time. Perhaps.

Working out the best way to combine a set of date spans, given a set L of date spans: L[(s1,e1), (s2,e2) ... (sn,en)], I need to cycle through the set and merge them down into the smallest set of spans.

I also need to keep track of how many times each portion of a date span occurred within the original set. This is so that the weighting of each date span can be calculated. The simplest way may be to use a sparse array of all possible dates, the largest size is pretty much 80*365 (80 being the maximum age we look at.) Then increment all the dates that are covered by a span.

I need to work on some way to speed up the condition matching. Those that involved a progressed midheaven and ascendant are quite slow/inefficient, mostly because it needs to step through a large number of dates (365*80 on average) checking for a match on each date.

Ended up running the atlas validation just one more time after some tweaking to make sure that we extract the correct county data every time (it seems to be handled differently for different countries)

Thursday, February 26, 2009

The Beginnings of Fertility (20090226)

Lots on new Ubuntu VMs. Working the new biscuit OF VM, trying to get the user-context switch working so the instance can start up as root and then switch to ofop, after opening the listener on the right port (443)

Worked up a script to stick into /etc/init.d to start the instance. Basically took the init.d script for ntp, and fiddled with it from there.

Found out the easiest way to get the service started at the correct run-level (on Ubuntu it's update-rc.d)

Started working through a check of all the fertility checks to make sure all are valid (it's been quite a while since I last looked at this code.) There was quite a bit of confusion initially as to what we are actually checking, and I need to make sure that we ended up implementing the correct ones. Once we're happy that we are doing the right thing (as far as all the conditions are concerned) we can implement an interface for VB6 to use.