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)