Forums / Addon Payment Modules / Dwolla Payments module

Dwolla Payments module

Started by mmwilcox on 9 Dec 2010, 3:18 PM · Views: 19,897

Results 61 to 80 of 82
3 Feb 2013, 1:25 PM
#61
mpcrerun avatar

mpcrerun

New Zenner

Join Date:
Mar 2012
Posts:
16
Plugin Contributions:
0

Dwolla Payments module

Limitless:

Sweet.

So adding the following:

"Discount": 0.00,
"AllowFundingSources": "true",

Will give Dwolla Users the ability to get a discount for using it (assuming that is a percentage) and now customers can initiate a transaction without needing to have a Dwolla account.

Kind of... actually the "allowFundingSources" needs to be OUTSIDE the "purchaseOrder" array so that it looks like this (note the bold and where it is, otherwise it will not show the right screen in dwolla):
$dwollaJson = array(
'key' => MODULE_PAYMENT_DWOLLA_API_KEY,
'secret' => MODULE_PAYMENT_DWOLLA_API_CODE,
//'callback' => zen_href_link('dwolla_main_handler.php', '', 'SSL',false,false,true),
'redirect' => zen_href_link(FILENAME_CHECKOUT_PROCESS, 'referer=dwolla', 'SSL'),
'callback' => 'put your callback url here: we do not have a handler yet, but this is where it will go',
//sending custid,sendto, billto, and zenSessionid as orderid. Will split this up in dwolla_main_handler.php (our future callback file)
'orderId' => $_SESSION['customer_id']. '::' . $_SESSION['billto'] . '::' . $_SESSION['sendto'] . '::' . zen_session_id(),
'test' => (MODULE_PAYMENT_DWOLLA_SERVER == 'Test') ? 'true' : 'false',
'allowFundingSources' => 'true',
'purchaseOrder' => array(
'destinationId' => MODULE_PAYMENT_DWOLLA_DESTINATION_ID,
'discount' => $discount,

			'shipping'		=> $shipping,
			'tax'			=> $tax,
			'total'			=> $total - $dwolladiscount,
			'orderItems'	=> $items,
			'notes'			=> 'Order from ZenCart. Session Name ' . zen_session_name() . ' / ID #' . zen_session_id()
		)
	);

Additionally, about the discounts, in the dwolla.php file, you will see the $dwolladiscount var. You can use one of the following two ways (note that the one for a percentage is commented out)
// This can be discounts, low order fees, etc
// When the value is negative, it means that
// theres a discount(s) applied.
// When the value is positive, there's a
// fee applied.
//The following is for no discount on an exact money amount:
$dwolladiscount = 0.00;
// Or use this for a percentage of say 1.5% fpr using dwolla:
// $dwolladiscount = $total * 0.015
$discount -= $dwolladiscount;
if($discount > 0) {
$items[] = array(
'Description' => 'Extra Merchant Fees',
'Name' => 'Fee',
'Price' => $discount,
'Quantity' => 1
);
} else {

	}

What we could do is wrap that whole section up into an if condition and get environment information from settings in the modules configuration to use either the percentage or the dollar amount dynamically. I am still working on the callback feature so that this thing works pretty much like a paypal version so the orders are handled via server to server calls. I am looking to see how to move the orders from the customer basket table to the orders table without losing anything, and whether that needs to be done via the ZENID or the CustomerId. One of the two will need to be passed to dwolla and then it will be returned both as a server to server call AND as url parameters when the user is redirected back to the site. Clearly we would rather the server to server handle that as we do not know the user will always land back on the site.

I will keep you posted. In the meantime, if you know anything about how to handle the movement of baskets to orders, let me know. And if you have any questions about the other stuff, let me know that too :-)

Cheers

3 Feb 2013, 2:19 PM
#62
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Dwolla Payments module

MPCReRuN:

I am still working on the callback feature so that this thing works pretty much like a paypal version so the orders are handled via server to server calls. I am looking to see how to move the orders from the customer basket table to the orders table without losing anything, and whether that needs to be done via the ZENID or the CustomerId. One of the two will need to be passed to dwolla and then it will be returned both as a server to server call AND as url parameters when the user is redirected back to the site. Clearly we would rather the server to server handle that as we do not know the user will always land back on the site.
And how exactly would you prevent duplicate orders in the event of a race condition?
Sounds like you're building something that's fraught with all the undesired side effects of the antiquated and less reliable IPN module.
Does their gateway not allow for reliable real-time verification?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 May 2013, 12:09 AM
#63
510ego avatar

510ego

New Zenner

Join Date:
Feb 2011
Posts:
100
Plugin Contributions:
0

Re: Dwolla Payments module

i spoke to micheal at dwolla. the new "guest checkout" has been submitted to zen-cart. i was just wondering when it will be in the payment modules plugins page?

13 May 2013, 7:31 PM
#64
bi11i avatar

bi11i

Zen Follower

Join Date:
Jun 2005
Location:
Portland, OR
Posts:
157
Plugin Contributions:
0

Re: Dwolla Payments module

This new module is great, however even when inactive (but installed) it absolutely destroys my site CSS on the payment page. Anyone else seeing this?

13 May 2013, 8:22 PM
#65
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: Dwolla Payments module

bi11i:

This new module is great, however even when inactive (but installed) it absolutely destroys my site CSS on the payment page. Anyone else seeing this?

Just updated to the latest version and I am not seeing anything weird with css issues.

13 May 2013, 8:29 PM
#66
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: Dwolla Payments module

The new module is missing something I think.

I assume the second text box below the API is for the 'Secret' but its missing the definition.

Also, what are all the other blank boxes for below the payment zones?

Attachment 12492

14 May 2013, 1:47 AM
#67
bi11i avatar

bi11i

Zen Follower

Join Date:
Jun 2005
Location:
Portland, OR
Posts:
157
Plugin Contributions:
0

Re: Dwolla Payments module

Limitless:

Just updated to the latest version and I am not seeing anything weird with css issues.
here's what i see when the module is simple installed (not active, but just installed.) I have to remove the whole thing to remedy the enlargement issue.

Attachment 12493
Attachment 12494

14 May 2013, 5:34 AM
#68
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: Dwolla Payments module

bi11i:

here's what i see when the module is simple installed (not active, but just installed.) I have to remove the whole thing to remedy the enlargement issue.

Attachment 12493
Attachment 12494

That's pretty strange. Do you have firebug or developer tools installed so you can see what css is getting loaded?

Completely as an aside, I see you are a David Thorne fan.

:*)

14 May 2013, 3:59 PM
#69
bi11i avatar

bi11i

Zen Follower

Join Date:
Jun 2005
Location:
Portland, OR
Posts:
157
Plugin Contributions:
0

Re: Dwolla Payments module

haha, i just noticed that little bubble up there in the pic. yes, a fan for sure.

i could get firebug put in place but i'm not knowledgeable enough to see what the issue would be. let me do some more digging.

Limitless:

That's pretty strange. Do you have firebug or developer tools installed so you can see what css is getting loaded?

Completely as an aside, I see you are a David Thorne fan.

:*)

13 Jun 2013, 4:20 AM
#70
dkerfoot avatar

dkerfoot

New Zenner

Join Date:
Mar 2007
Posts:
72
Plugin Contributions:
0

Re: Dwolla Payments module

I am seeing the exact same behavior. Latest version of Dwolla Module, Zencart 1.3.9h

When I click install and fill out the boxes, fonts on checkout_payment and subsequent steps get supersized. Happens even when Dwolla is not enabled. Click remove button and all is back to normal.

I would love to get this installed - please help!

bi11i:

here's what i see when the module is simple installed (not active, but just installed.) I have to remove the whole thing to remedy the enlargement issue.

Attachment 12493
Attachment 12494

Doug Kerfoot
KeyLlama.com

13 Jun 2013, 4:03 PM
#71
bi11i avatar

bi11i

Zen Follower

Join Date:
Jun 2005
Location:
Portland, OR
Posts:
157
Plugin Contributions:
0

Re: Dwolla Payments module

dkerfoot:

I am seeing the exact same behavior. Latest version of Dwolla Module, Zencart 1.3.9h

When I click install and fill out the boxes, fonts on checkout_payment and subsequent steps get supersized. Happens even when Dwolla is not enabled. Click remove button and all is back to normal.

I would love to get this installed - please help!
i ended paying someone to figure this out for me. There was one extra php closing tag (?>) , in includes/languages/english/modules/payment/dwolla.php

either way, i can't get it to work properly. it's not posting back payment or shipping method. it's posting orders in pending status even when the transaction fails. it also seems to skip an order number when placed. a little too buggy to put on my production cart.

3 Jul 2013, 8:48 PM
#72
shinypenguin avatar

shinypenguin

New Zenner

Join Date:
Jun 2010
Posts:
23
Plugin Contributions:
0

Re: Dwolla Payments module

I was thinking about adding this Dwolla module to a website, but a little concerned about the outside links in the code: https://dzencart.herokuapp.com/logo.png and https://doscommerce.herokuapp.com/

The first image link is used in three places, and I'm assuming the image can be saved to my domain and used instead

The second link is used in the dwolla class constructor, line 42 in /includes/modules/payment/dwolla.php:

$this->form_action_url = "https://doscommerce.herokuapp.com/";

I'm guessing that causes form submissions to post to that address, but not sure of the purpose.

Is there a way to perform the submission processes from my domain to Dwolla directly? Glancing through some of Dwolla's API information, all the calls appear to go to the dwolla.com domain, so not sure how the herokuapp.com pages are related.

4 Jul 2013, 1:09 AM
#73
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Dwolla Payments module

shinypenguin:

I was thinking about adding this Dwolla module to a website, but a little concerned about the outside links in the code: https://dzencart.herokuapp.com/logo.png and https://doscommerce.herokuapp.com/

The first image link is used in three places, and I'm assuming the image can be saved to my domain and used instead

The second link is used in the dwolla class constructor, line 42 in /includes/modules/payment/dwolla.php:

$this->form_action_url = "https://doscommerce.herokuapp.com/";

> 
> I'm guessing that causes form submissions to post to that address, but not sure of the purpose.
> 
> Is there a way to perform the submission processes from my domain to Dwolla directly? Glancing through some of Dwolla's API information, all the calls appear to go to the dwolla.com domain, so not sure how the herokuapp.com pages are related.

Ya, I'd be pretty suspicious of that too.
Contact dwolla directly to confirm.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jul 2013, 2:22 PM
#74
limitless avatar

limitless

Inactive

Join Date:
Jan 2012
Posts:
496
Plugin Contributions:
0

Re: Dwolla Payments module

DrByte:

Ya, I'd be pretty suspicious of that too.
Contact dwolla directly to confirm.

Its a cloud app platform. Looks like they offload the processing / gateway to that service.

https://www.heroku.com/

11 Jul 2013, 8:19 PM
#75
shinypenguin avatar

shinypenguin

New Zenner

Join Date:
Jun 2010
Posts:
23
Plugin Contributions:
0

Re: Dwolla Payments module

Limitless:

Its a cloud app platform. Looks like they offload the processing / gateway to that service.

https://www.heroku.com/

Just to follow up, I contacted Dwolla and they confirmed the page is run by them. Here is the explanation:

OSCommerce (and ZenCart, for that matter), requires that you make a POST type request from the checkout confirmation page, and into the payment gateway's page. Unfortunately, our "direct-submission" method only allows developers to specify 1 product, and is otherwise very limited and what you can pass to it. I've created that heroku page to act as a gateway between that direct POST submission, and our offsite gateway's "Server-to-server" protocol.

They also provided the source code (basically just a simple redirect) to allow running the page on my own server. Haven't installed the module yet, but will probably self-host the redirect to avoid any potential Heroku downtime or security issues.

On a side note, their customer service gave a very good impression. After interacting with Google Checkout/Wallet support previously, I felt bad for any of our customers who may have had to deal with Google support.

5 Aug 2013, 11:16 PM
#76
dereck72 avatar

dereck72

New Zenner

Join Date:
Jul 2013
Posts:
16
Plugin Contributions:
0

Re: Dwolla Payments module

Great module! I have one question though. If I click confirm order it takes me to the dwolla pay as guest/login to account page. There is an option to cancel and return to store. I click that and it brings me back to "successful checkout" should it not send me back to step 2 of checkout? also it generates a pending transaction in zencart. I hope to get this up and running soon.

17 Aug 2013, 10:33 PM
#77
mohsenalam avatar

mohsenalam

New Zenner

Join Date:
Aug 2013
Location:
Rowland heights, CA
Posts:
7
Plugin Contributions:
0

Re: Dwolla Payments module

I'm a new user of zen-cart. and recently I installed Dwolla (version 3.1.1) on my site.( my zen-cart version 1.5)

I created API from https://www.dwolla.com/applications/create .
I put the API and secret key in the proper places. But i can't find Dwolla working on my site.
What can be the problem?

In zen-cart admin panel, Dwolla configuration has a line such as: "When registering a Dwolla Application for this site, you will need to input this Webhook URL:"

I don't know where to use this given URL.

Please help me.

16 Oct 2013, 10:06 PM
#78
shinypenguin avatar

shinypenguin

New Zenner

Join Date:
Jun 2010
Posts:
23
Plugin Contributions:
0

Re: Dwolla Payments module

mohsenalam:

I'm a new user of zen-cart. and recently I installed Dwolla (version 3.1.1) on my site.( my zen-cart version 1.5)

I created API from https://www.dwolla.com/applications/create .
I put the API and secret key in the proper places. But i can't find Dwolla working on my site.
What can be the problem?

In zen-cart admin panel, Dwolla configuration has a line such as: "When registering a Dwolla Application for this site, you will need to input this Webhook URL:"

I don't know where to use this given URL.

Please help me.

Old question, but responding in case you did not solve already. From the readme: "Find your application (https://www.dwolla.com/applications) and follow the Edit Features link. Set "Web Hook Notifications" to Enabled and paste the Webhook URL into the "All URL" field. Type in your PIN and submit the form."

dereck72:

Great module! I have one question though. If I click confirm order it takes me to the dwolla pay as guest/login to account page. There is an option to cancel and return to store. I click that and it brings me back to "successful checkout" should it not send me back to step 2 of checkout? also it generates a pending transaction in zencart. I hope to get this up and running soon.

Have you found a solution to this? I finally got around to installing this mod and I'm experiencing the same issue. I checked the server log and the return URL for a cancelled payment is:

"/index.php?main_page=checkout_process&referer=dwolla&error=failure&error_description=User+Cancelled"

Which is 302 redirected to:

"/index.php?main_page=checkout_success"

I haven't done much looking yet, but I would guess the "&" in the URL is problematic, and I haven't found where the URL error messages are handled by the Dwolla module to prevent checkout completion. I'm guessing it will need to be bounced back to the shopping cart or the payment selection page.

17 Oct 2013, 11:46 PM
#79
dereck72 avatar

dereck72

New Zenner

Join Date:
Jul 2013
Posts:
16
Plugin Contributions:
0

Re: Dwolla Payments module

Unfortunately I haven't. I am not savy enough to fix it myself. Was it also generating an unpaid order ID on the admin page for you as well? Also, it didn't show in my account under the ID I placed the order through, but I did get redirected back to the congratulations checkout complete page. I figure that's got to have an affect on inventory. Sorry for the late reply, I have put my site to the side for now as I had too much going on atm. Hopefully can get it going soon.

18 Oct 2013, 12:21 AM
#80
shinypenguin avatar

shinypenguin

New Zenner

Join Date:
Jun 2010
Posts:
23
Plugin Contributions:
0

Re: Dwolla Payments module

dereck72:

Unfortunately I haven't. I am not savy enough to fix it myself. Was it also generating an unpaid order ID on the admin page for you as well? Also, it didn't show in my account under the ID I placed the order through, but I did get redirected back to the congratulations checkout complete page. I figure that's got to have an affect on inventory. Sorry for the late reply, I have put my site to the side for now as I had too much going on atm. Hopefully can get it going soon.

Yes, it was generating the unpaid order for me also. I fixed the & in the URL, but it didn't make a difference. I am pretty sure the response parameters are not being handled by the mod, and after reviewing the code a bit, it looks like there may be some other potential issues.

The mod creates a new order ID when the customer chooses Dwolla on the "Payment Information" page. The temporary orders are then deleted the next time Dwolla is chosen as the payment method, if no extra information was saved to the order (this looks like a potential issue if more than one customer uses Dwolla at the same time, though I have not tested it).

Extra information is saved when the customer hits the "Confirm Order" button and is taken to the Dwolla payment page, so the order will not get deleted automatically as it normally would. The mod also appears to skip some of Zen Carts built in order processing commands, such as creating the order (since most other payment methods create the order AFTER confirmed payment, rather than before - which eliminates the issue of temporary order deletions and concurrent checkouts), deducting inventory, and sending emails, and it is looks like the workflow will always redirect to the success page after being directed back from the Dwolla gateway.

I spent a couple hours yesterday looking through the code, and decided I will have to put off implementing until things slow down, or a possibly if a new version is released.