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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, alter_paypal_api_requests.patch, failed testing.

stella’s picture

Status: Needs work » Needs review
FileSize
518 bytes

patch reroll

Status: Needs review » Needs work

The last submitted patch, alter_paypal_api_requests.patch, failed testing.

stella’s picture

Status: Needs work » Needs review
FileSize
4.91 KB

Here'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.

Status: Needs review » Needs work

The last submitted patch, 1307924.patch, failed testing.

TR’s picture

Version: 6.x-2.6 » 6.x-2.x-dev
Status: Needs work » Needs review
TR’s picture

#4: 1307924.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 1307924.patch, failed testing.

TR’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev

New features should go into 7.x-3.x first.

longwave’s picture

Version: 7.x-3.x-dev » 8.x-4.x-dev
Issue summary: View changes
Status: Needs work » Fixed

Not 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.