I have a client who wants to use PayPal's Express Checkout payment method, but also has more than one PayPal merchant account. The site supports transactions in both Euros and GBP and the transactions have to be routed to different PayPal accounts depending on the currency chosen. It's a cross border, legal entity thing, as far as I can understand.
Anyway, it's only possible to configure one PayPal account with the current module. Ideally the module would provide a UI to configure different merchant settings based on custom rules or conditions. However, that's a major change or rewrite, so instead the easiest solution is a one line patch to uc_paypal.module to allow other modules alter the api merchant details in use before the request is sent. Attached patch adds this functionality.
Comment | File | Size | Author |
---|---|---|---|
#4 | 1307924.patch | 4.91 KB | stella |
#2 | alter_paypal_api_requests.patch | 518 bytes | stella |
alter_paypal_api_requests.patch | 642 bytes | stella | |
Comments
Comment #2
stella CreditAttribution: stella commentedpatch reroll
Comment #4
stella CreditAttribution: stella commentedHere's a new version of the patch. Turns out $request variable wasn't enough by itself to alter the message for every type of request, so the hook now takes the $order object too. I also added in some more error checking.
Comment #6
TR CreditAttribution: TR commentedComment #7
TR CreditAttribution: TR commented#4: 1307924.patch queued for re-testing.
Comment #9
TR CreditAttribution: TR commentedNew features should go into 7.x-3.x first.
Comment #10
longwaveNot going to happen in 7.x-3.x unless someone wants to provide a comprehensive patch, but this is now possible in 8.x-4.x.