You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Iain Mac Donald <ia...@freeuk.com> on 2006/07/08 13:32:58 UTC

worldpay integration

I have just come across this thread
http://lists.ofbiz.org/pipermail/users/2005-April/007461.html
and I am wondering if these issues have been resolved.

It seems the callback feature isn't working which in turn means the
initialise from Worldpay fails. The currency files and Worldpay certs
seem to get written to the correct places but because the callback fails
the loop isn't closed.

Anybody using Worldpay and Ofbiz successfully?
-- 
Regards,
Iain.




Re: worldpay integration

Posted by BJ Freeman <bj...@free-man.net>.
I will run the sand box version here.
then get back to your if andy has not responded.


Iain Mac Donald sent the following on 7/10/2006 3:46 PM:
> I have wasted days trying to get Worldpay and Ofbiz to talk to each
> other without success.
> 
> I am getting this in the logs
> 
> EXCEPTION com.worldpay.select.SelectException: Process failed
> Caused By: EXCEPTION com.worldpay.protocols.crypto.CryptoException:
> Failed to get keypair generator
> Caused By: EXCEPTION com.worldpay.select.SelectException: Select key
> generator algorithm not found
> Caused By: java.security.NoSuchAlgorithmException: class
> cryptix.provider.rsa.BaseRSAKeyPairGenerator configured for
> KeyPairGenerator(provider: Cryptix) cannot be acces
> sed.
> 
> The Tomcat docs suggest this is because the JVM cannot find the JSSE JAR
> files. Can that be correct as Tomcat quite happily serves the correct
> cert to browsers.
> 
> AND
> 
> I still think the callback URL isn't correct.
> 
> I had a look at SelectRespServlet.java and WorldPayEvents.java.
> 
> My understanding is that WorldPayEvents initializes the M_ variables
> and 
> passes them to WorldPay; SelectRespServlet handles the callback and is 
> passed back the variable contents by WorldPay.
> 
> SelectRespServlet is addressed by the callback URL via
> 
> https://mysite.com/ecommerce/select
> 
> I notice that ofbiz requires various callback data to be returned via 
> the callback URL, which are initialized in WorldPayEvents:
> 
> M_controlPath
> M_userLoginId
> M_dispatchName
> M_delegatorName
> M_webSiteId
> M_localLocale
> M_confirmTemplate
> 
> SelectRespServlet requests those parameters (using the same name), so 
> presumably the callback URL should be defined as
> 
> https://mysite.com/ecommerce/select?M_controlPath=<wpdisplay 
> item=M_controlPath>
> 
> 
> But what about the other M_ variables?
> And what about
> 
> M_notifyEmail
> M_confirmEmail
> 
> which are requested in SelectRespServlet but not initialized or used 
> anywhere else?
> 
> 
> 
> 
> 
> On Sat, 2006-07-08 at 21:13 -0700, BJ Freeman wrote:
>> ok the M_ is used to pass back data to ofbiz. it is not  data processed 
>> by world pay.
>> The URL for the pass back is already created.
>>
>> since each product store used diffenent settings, I don't see the need 
>> for m_somesetting_1
>>
>> hope that helps
>>
>>
>> Iain Mac Donald sent the following on 7/8/2006 2:54 PM:
>>> I think in about 6 months I will understand your reply :)
>>> Currently I am at the bottom of a very steep learning curve.
>>>
>>> I could see from your previous post the URL needs to include the
>>> variable M_controlpath. However, what I don't know is how I express that
>>> URL so that Ofbiz understands it.
>>>
>>> Thanks in anticipation.
>>>
>>>
>>> On Sat, 2006-07-08 at 11:28 -0700, BJ Freeman wrote:
>>>> I have not used Worldpay, but have others.
>>>>  From the Documentation from world pay M_ has a Different meaning the 
>>>> MC_. both are world pay defined.
>>>> http://support.worldpay.com/kb/reference/faqs/callback_faqs.html
>>>>
>>>>
>>>> here is sample code from world pay
>>>> http://support.worldpay.com/integrations/invisible/iig/pro.java
>>>> that shows how to send with different iinstallation and merchant ID's
>>>>
>>>>
>>>> application/accounting/src/org/ofbiz/thirdparty/worldpay/SelectRespServlet.java 
>>>> and WorldPayEvents how the send-back (call back) is handled,
>>>> and  shows the properties and how there are used.
>>>>
>>>> you can find reference to
>>>> _CONTROL_PATH_ (       linkParms.setValue("M_controlPath", 
>>>> (String)request.getAttribute("_CONTROL_PATH_"));
>>>> )
>>>> in
>>>> ControlServlet.java
>>>> and
>>>> makeLink in RequestHandler.java.
>>>> this will let you figure out what the real address would be.
>>>>
>>>>
>>>> so after all that the answer is:
>>>> ofbiz code is setup to handle accounts from different ProductStore.
>>>>          GenericValue paymentConfig = 
>>>> ProductStoreWorker.getProductStorePaymentSetting(delegator, 
>>>> productStore.getString("productStoreId"), "EXT_WORLDPAY", null, true);
>>>>
>>>> so based on the parms for that productStore, the URL is created.
>>>> in this case M_ is passed back to ofbiz and handled in 
>>>> SelectRespServlet.java
>>>>
>>>>
>>>>
>>>>
>>>> Iain Mac Donald sent the following on 7/8/2006 10:16 AM:
>>>>> Hello BJ
>>>>>
>>>>>
>>>>> On Sat, 2006-07-08 at 07:35 -0700, BJ Freeman wrote:
>>>>>> I believe andy did some work on it. it should also be in the emails 
>>>>>> archives.
>>>>> I had seen your contributions in the thread, I referenced before, but I
>>>>> am probably being a bit dim
>>>>>
>>>>> <quote>
>>>>> We don't have to change the code.
>>>>> but the World pay setup for Call back has to be initialize
>>>>> the instruction are under
>>>>> "Can I have more than one callback URL per installation ID? "
>>>>> Finally, on the Customer Management System, you will need to set your
>>>>> Callback URL to include the name of the variable using wpdisplay, e.g.:
>>>>> <wpdisplay item=M_controlpath>
>>>>> the variable used by ofbiz is 
>>>>> M_controlpath
>>>>> </quote>
>>>>>
>>>>> Are you saying that all I need to do is set the callback URL to...
>>>>>
>>>>> http://mysite.com:8080/ecommerce/select[something else here]
>>>>>
>>>>> I am not sure what the [something else here] should be
>>>>>
>>>>>
>>>>>
>>>>>> NOt sure if this was pre Jira or not. so you might check the Jira list 
>>>>>> as well.
>>>>> Didn't find anything here.
>>>>>
>>>>>
>>>>>> Iain Mac Donald sent the following on 7/8/2006 4:32 AM:
>>>>>>> I have just come across this thread
>>>>>>> http://lists.ofbiz.org/pipermail/users/2005-April/007461.html
>>>>>>> and I am wondering if these issues have been resolved.
>>>>>>>
>>>>>>> It seems the callback feature isn't working which in turn means the
>>>>>>> initialise from Worldpay fails. The currency files and Worldpay certs
>>>>>>> seem to get written to the correct places but because the callback fails
>>>>>>> the loop isn't closed.
>>>>>>>
>>>>>>> Anybody using Worldpay and Ofbiz successfully?
> 

Re: worldpay integration

Posted by BJ Freeman <bj...@free-man.net>.
These are mostly refactoring.
did not find when the entity change happened.

changes:
7/11/ rev 5298  by si chen Refactored createPaymentFromPreference into a 
service so that creating payments can cause automatic journal posting
8/05  rev 5462 Updated svn:keywords properties, including all of them to 
try to avoid having to change them again in the future
1/31/06 rev 6642 This is a refactoring to replace all instances of 
order_id with orderId. It has been tested for creating orders, shipping, 
packing, creating notes, cancelling quantity, ecommerce orders, and 
viewing. We need some more testing to find any cases that were missed.


Iain Mac Donald sent the following on 7/11/2006 3:46 PM:
> On Tue, 2006-07-11 at 11:43 -0700, BJ Freeman wrote:
>> You are going to have to upgrade your application, and probably your 
>> framework.  You at least need the world pay code and Productworker.java 
>> upgraded.
>> as I have found this usually means that there are other underlying 
>> changes in other sections that need to change.
>> I suggest you copy the config files you have changed new name then when 
>> you port over the new code, your old configurations will be intact and 
>> you can update the new ones.
>>
> 
> Do you know when this issue was fixed. I couldn't find any mention in
> jira or elsewhere.
> 
> I had a look at the latest svn of ofbiz and the readme in accounting/lib
> suggests to just drop the Worldpay stuff in said directory. Now the
> Worldpay provided stuff (emailed to me last week) is version 0.16 (and
> seems to date from around 2000) whereas the Ofbiz bundled version is
> 0.17. 
> 
> So I am confused Worldpay/Ofbiz has worked in the past and also works
> now yet it appears Worldpay hasn't changed since 2000. The obvious, but
> not necessarily correct, assumption is that things got broken/fixed in
> Ofbiz in between times. The revision I am using is 5274 from about July
> 2005. 
> 
> Anybody using an Ofbiz revision from around this period with Worldpay
> working?
> 
> Assuming I do have to upgrade which version/revision would you consider
> to be the most suitable (incl Worldpay working) for production use?
> 
> Many thanks in anticipation.
> Iain.
> 
>> You will have to update the paymentProperties and paymentPropertiesPath 
>> in the web.xml
>>
>> Iain Mac Donald sent the following on 7/11/2006 11:11 AM:
>>> OK nearly got this Worldpay/Ofbiz integration sorted. Initialisation has
>>> now worked. However, I am still unable to get a successful callback.
>>>
>>> I have attached the exception I received (see below). This appears to be
>>> exactly as described in this message on the dev list
>>>
>>> http://lists.ofbiz.org/pipermail/dev/2004-November/006904.html
>>>
>>> Anyone know if this got resolved?
>>>
> 

Re: worldpay integration

Posted by Iain Mac Donald <ia...@freeuk.com>.
On Tue, 2006-07-11 at 11:43 -0700, BJ Freeman wrote:
> You are going to have to upgrade your application, and probably your 
> framework.  You at least need the world pay code and Productworker.java 
> upgraded.
> as I have found this usually means that there are other underlying 
> changes in other sections that need to change.
> I suggest you copy the config files you have changed new name then when 
> you port over the new code, your old configurations will be intact and 
> you can update the new ones.
> 

Do you know when this issue was fixed. I couldn't find any mention in
jira or elsewhere.

I had a look at the latest svn of ofbiz and the readme in accounting/lib
suggests to just drop the Worldpay stuff in said directory. Now the
Worldpay provided stuff (emailed to me last week) is version 0.16 (and
seems to date from around 2000) whereas the Ofbiz bundled version is
0.17. 

So I am confused Worldpay/Ofbiz has worked in the past and also works
now yet it appears Worldpay hasn't changed since 2000. The obvious, but
not necessarily correct, assumption is that things got broken/fixed in
Ofbiz in between times. The revision I am using is 5274 from about July
2005. 

Anybody using an Ofbiz revision from around this period with Worldpay
working?

Assuming I do have to upgrade which version/revision would you consider
to be the most suitable (incl Worldpay working) for production use?

Many thanks in anticipation.
Iain.

> 
> You will have to update the paymentProperties and paymentPropertiesPath 
> in the web.xml
> 
> Iain Mac Donald sent the following on 7/11/2006 11:11 AM:
> > OK nearly got this Worldpay/Ofbiz integration sorted. Initialisation has
> > now worked. However, I am still unable to get a successful callback.
> > 
> > I have attached the exception I received (see below). This appears to be
> > exactly as described in this message on the dev list
> > 
> > http://lists.ofbiz.org/pipermail/dev/2004-November/006904.html
> > 
> > Anyone know if this got resolved?
> > 

-- 
Regards,
Iain.




Re: worldpay integration

Posted by Iain Mac Donald <ia...@freeuk.com>.
On Tue, 2006-07-11 at 11:43 -0700, BJ Freeman wrote:
> You are going to have to upgrade your application, and probably your 
> framework.  You at least need the world pay code and Productworker.java 
> upgraded.
> as I have found this usually means that there are other underlying 
> changes in other sections that need to change.
> I suggest you copy the config files you have changed new name then when 
> you port over the new code, your old configurations will be intact and 
> you can update the new ones.
> 

Do you know when this issue was fixed. I couldn't find any mention in
jira or elsewhere.

I had a look at the latest svn of ofbiz and the readme in accounting/lib
suggests to just drop the Worldpay stuff in said directory. Now the
Worldpay provided stuff (emailed to me last week) is version 0.16 (and
seems to date from around 2000) whereas the Ofbiz bundled version is
0.17. 

So I am confused Worldpay/Ofbiz has worked in the past and also works
now yet it appears Worldpay hasn't changed since 2000. The obvious, but
not necessarily correct, assumption is that things got broken/fixed in
Ofbiz in between times. The revision I am using is 5274 from about July
2005. 

Anybody using an Ofbiz revision from around this period with Worldpay
working?

Assuming I do have to upgrade which version/revision would you consider
to be the most suitable (incl Worldpay working) for production use?

Many thanks in anticipation.
Iain.

> 
> You will have to update the paymentProperties and paymentPropertiesPath 
> in the web.xml
> 
> Iain Mac Donald sent the following on 7/11/2006 11:11 AM:
> > OK nearly got this Worldpay/Ofbiz integration sorted. Initialisation has
> > now worked. However, I am still unable to get a successful callback.
> > 
> > I have attached the exception I received (see below). This appears to be
> > exactly as described in this message on the dev list
> > 
> > http://lists.ofbiz.org/pipermail/dev/2004-November/006904.html
> > 
> > Anyone know if this got resolved?
> > 

-- 
Regards,
Iain.




Re: worldpay integration

Posted by BJ Freeman <bj...@free-man.net>.
You are going to have to upgrade your application, and probably your 
framework.  You at least need the world pay code and Productworker.java 
upgraded.
as I have found this usually means that there are other underlying 
changes in other sections that need to change.
I suggest you copy the config files you have changed new name then when 
you port over the new code, your old configurations will be intact and 
you can update the new ones.




You will have to update the paymentProperties and paymentPropertiesPath 
in the web.xml

Iain Mac Donald sent the following on 7/11/2006 11:11 AM:
> OK nearly got this Worldpay/Ofbiz integration sorted. Initialisation has
> now worked. However, I am still unable to get a successful callback.
> 
> I have attached the exception I received (see below). This appears to be
> exactly as described in this message on the dev list
> 
> http://lists.ofbiz.org/pipermail/dev/2004-November/006904.html
> 
> Anyone know if this got resolved?
> 

Re: worldpay integration

Posted by David E Jones <jo...@undersunconsulting.com>.
It looks like this is pretty old code that hasn't been updated for refactoring done a few years ago (probably 3-4 years now...) when the ProductStore was introduced. The WebSitePaymentSetting entity doesn't exist any more, and instead the ProductStorePaymentSetting is the one used.

In general I'd be a bit surprised to see the Worldpay stuff working out of the box as I'm not aware of anyone having maintained it in recent years... In other words, it's almost certainly going to require some programming changes to get it to work.

BTW, it's best to post on the dev or user mailing list but not both. I'm replying only to the dev list which seems the better place for this now that it is getting into changes that need to be made to the Worldpay code.

-David


Iain Mac Donald wrote:
> OK nearly got this Worldpay/Ofbiz integration sorted. Initialisation has
> now worked. However, I am still unable to get a successful callback.
> 
> I have attached the exception I received (see below). This appears to be
> exactly as described in this message on the dev list
> 
> http://lists.ofbiz.org/pipermail/dev/2004-November/006904.html
> 
> Anyone know if this got resolved?
> 
> 
> 
> ------------------------------------------------------------------------
> 
> java.lang.IllegalArgumentException: [GenericDelegator.makePK] could not find entity for entityName: WebSitePaymentSetting
> 	at org.ofbiz.entity.GenericDelegator.makePK(GenericDelegator.java:507)
> 	at org.ofbiz.entity.GenericDelegator.findByPrimaryKey(GenericDelegator.java:1304)
> 	at org.ofbiz.accounting.thirdparty.worldpay.SelectRespServlet.doRequest(SelectRespServlet.java:116)
> 	at com.worldpay.select.merchant.SelectServlet.process(SelectServlet.java:131)
> 	at com.worldpay.select.merchant.SelectDispatcher.dispatch(SelectDispatcher.java:54)
> 	at com.worldpay.select.merchant.SelectHandler.handleRequest(SelectHandler.java:114)
> 	at com.worldpay.servlet.WorldPayServlet.service(WorldPayServlet.java:73)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:237)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
> 	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> 	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
> 	at java.lang.Thread.run(Thread.java:534)

Re: worldpay integration

Posted by Iain Mac Donald <ia...@freeuk.com>.
OK nearly got this Worldpay/Ofbiz integration sorted. Initialisation has
now worked. However, I am still unable to get a successful callback.

I have attached the exception I received (see below). This appears to be
exactly as described in this message on the dev list

http://lists.ofbiz.org/pipermail/dev/2004-November/006904.html

Anyone know if this got resolved?

-- 
Regards,
Iain.



Re: worldpay integration

Posted by Iain Mac Donald <ia...@freeuk.com>.
OK nearly got this Worldpay/Ofbiz integration sorted. Initialisation has
now worked. However, I am still unable to get a successful callback.

I have attached the exception I received (see below). This appears to be
exactly as described in this message on the dev list

http://lists.ofbiz.org/pipermail/dev/2004-November/006904.html

Anyone know if this got resolved?

-- 
Regards,
Iain.



Re: worldpay integration

Posted by BJ Freeman <bj...@free-man.net>.
http://support.worldpay.com/kb/integration_guides/pro/help/spig3621.html
says you set the call back URL in worldpay, I assume that ofbiz is 
geared for the default.

I don't have a WorldPay account , so I can't check this out.




Iain Mac Donald sent the following on 7/11/2006 2:57 AM:
> On Mon, 2006-07-10 at 16:39 -0700, BJ Freeman wrote:
>> you have done the applications/accounting/lib/worldpay/readme.txt and 
>> setup the *.properties?
> 
> Partly SOLVED!
> 
> The startofbiz.sh shipped with the version of Ofbiz I am using (5274)
> has the following suggested addition for Worldpay
> 
> # Worldpay
> Config                                                                        
> #VMARGS="-Xbootclasspath/p:applications/accounting/lib/cryptix.jar
> $VMARGS"
> 
> I un-commented this and then tried an initialisation. The initialisation
> failed BUT it did write the currency, merchant and certificate files.
> 
> I then realised that the path was incorrect and changed it to include
> worldpay
> 
> applications/accounting/lib/worldpay/cryptix.jar
> 
> However, my initialisation attempts failed because the files had ALREADY
> been written. By this point I was assuming that it was the callback URL
> that was incorrect.
> 
> For the record the callback URL I am using is of the format
> 
> https://mysite.com:8443/ecommerce/select?M_controlPath=<wpdisplay
> item=M_controlPath>
> 
> However my callback is still not functioning.
> 
> 
> 
>> BJ Freeman sent the following on 7/10/2006 4:08 PM:
>>> found this
>>> http://lists.ofbiz.org/pipermail/users/2003-July/001332.html
>>>
>>>
>>> Iain Mac Donald sent the following on 7/10/2006 3:46 PM:
>>>> I have wasted days trying to get Worldpay and Ofbiz to talk to each
>>>> other without success.
>>>>
>>>> I am getting this in the logs
>>>>
>>>> EXCEPTION com.worldpay.select.SelectException: Process failed
>>>> Caused By: EXCEPTION com.worldpay.protocols.crypto.CryptoException:
>>>> Failed to get keypair generator
>>>> Caused By: EXCEPTION com.worldpay.select.SelectException: Select key
>>>> generator algorithm not found
>>>> Caused By: java.security.NoSuchAlgorithmException: class
>>>> cryptix.provider.rsa.BaseRSAKeyPairGenerator configured for
>>>> KeyPairGenerator(provider: Cryptix) cannot be acces
>>>> sed.
>>>>
>>>> The Tomcat docs suggest this is because the JVM cannot find the JSSE JAR
>>>> files. Can that be correct as Tomcat quite happily serves the correct
>>>> cert to browsers.
>>>>
>>>> AND
>>>>
>>>> I still think the callback URL isn't correct.
>>>>
>>>> I had a look at SelectRespServlet.java and WorldPayEvents.java.
>>>>
>>>> My understanding is that WorldPayEvents initializes the M_ variables
>>>> and passes them to WorldPay; SelectRespServlet handles the callback 
>>>> and is passed back the variable contents by WorldPay.
>>>>
>>>> SelectRespServlet is addressed by the callback URL via
>>>>
>>>> https://mysite.com/ecommerce/select
>>>>
>>>> I notice that ofbiz requires various callback data to be returned via 
>>>> the callback URL, which are initialized in WorldPayEvents:
>>>>
>>>> M_controlPath
>>>> M_userLoginId
>>>> M_dispatchName
>>>> M_delegatorName
>>>> M_webSiteId
>>>> M_localLocale
>>>> M_confirmTemplate
>>>>
>>>> SelectRespServlet requests those parameters (using the same name), so 
>>>> presumably the callback URL should be defined as
>>>>
>>>> https://mysite.com/ecommerce/select?M_controlPath=<wpdisplay 
>>>> item=M_controlPath>
>>>>
>>>>
>>>> But what about the other M_ variables?
>>>> And what about
>>>>
>>>> M_notifyEmail
>>>> M_confirmEmail
>>>>
>>>> which are requested in SelectRespServlet but not initialized or used 
>>>> anywhere else?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, 2006-07-08 at 21:13 -0700, BJ Freeman wrote:
>>>>> ok the M_ is used to pass back data to ofbiz. it is not  data 
>>>>> processed by world pay.
>>>>> The URL for the pass back is already created.
>>>>>
>>>>> since each product store used diffenent settings, I don't see the 
>>>>> need for m_somesetting_1
>>>>>
>>>>> hope that helps
>>>>>
>>>>>
>>>>> Iain Mac Donald sent the following on 7/8/2006 2:54 PM:
>>>>>> I think in about 6 months I will understand your reply :)
>>>>>> Currently I am at the bottom of a very steep learning curve.
>>>>>>
>>>>>> I could see from your previous post the URL needs to include the
>>>>>> variable M_controlpath. However, what I don't know is how I express 
>>>>>> that
>>>>>> URL so that Ofbiz understands it.
>>>>>>
>>>>>> Thanks in anticipation.
>>>>>>
>>>>>>
>>>>>> On Sat, 2006-07-08 at 11:28 -0700, BJ Freeman wrote:
>>>>>>> I have not used Worldpay, but have others.
>>>>>>>  From the Documentation from world pay M_ has a Different meaning 
>>>>>>> the MC_. both are world pay defined.
>>>>>>> http://support.worldpay.com/kb/reference/faqs/callback_faqs.html
>>>>>>>
>>>>>>>
>>>>>>> here is sample code from world pay
>>>>>>> http://support.worldpay.com/integrations/invisible/iig/pro.java
>>>>>>> that shows how to send with different iinstallation and merchant ID's
>>>>>>>
>>>>>>>
>>>>>>> application/accounting/src/org/ofbiz/thirdparty/worldpay/SelectRespServlet.java 
>>>>>>> and WorldPayEvents how the send-back (call back) is handled,
>>>>>>> and  shows the properties and how there are used.
>>>>>>>
>>>>>>> you can find reference to
>>>>>>> _CONTROL_PATH_ (       linkParms.setValue("M_controlPath", 
>>>>>>> (String)request.getAttribute("_CONTROL_PATH_"));
>>>>>>> )
>>>>>>> in
>>>>>>> ControlServlet.java
>>>>>>> and
>>>>>>> makeLink in RequestHandler.java.
>>>>>>> this will let you figure out what the real address would be.
>>>>>>>
>>>>>>>
>>>>>>> so after all that the answer is:
>>>>>>> ofbiz code is setup to handle accounts from different ProductStore.
>>>>>>>          GenericValue paymentConfig = 
>>>>>>> ProductStoreWorker.getProductStorePaymentSetting(delegator, 
>>>>>>> productStore.getString("productStoreId"), "EXT_WORLDPAY", null, true);
>>>>>>>
>>>>>>> so based on the parms for that productStore, the URL is created.
>>>>>>> in this case M_ is passed back to ofbiz and handled in 
>>>>>>> SelectRespServlet.java
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Iain Mac Donald sent the following on 7/8/2006 10:16 AM:
>>>>>>>> Hello BJ
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sat, 2006-07-08 at 07:35 -0700, BJ Freeman wrote:
>>>>>>>>> I believe andy did some work on it. it should also be in the 
>>>>>>>>> emails archives.
>>>>>>>> I had seen your contributions in the thread, I referenced before, 
>>>>>>>> but I
>>>>>>>> am probably being a bit dim
>>>>>>>>
>>>>>>>> <quote>
>>>>>>>> We don't have to change the code.
>>>>>>>> but the World pay setup for Call back has to be initialize
>>>>>>>> the instruction are under
>>>>>>>> "Can I have more than one callback URL per installation ID? "
>>>>>>>> Finally, on the Customer Management System, you will need to set your
>>>>>>>> Callback URL to include the name of the variable using wpdisplay, 
>>>>>>>> e.g.:
>>>>>>>> <wpdisplay item=M_controlpath>
>>>>>>>> the variable used by ofbiz is M_controlpath
>>>>>>>> </quote>
>>>>>>>>
>>>>>>>> Are you saying that all I need to do is set the callback URL to...
>>>>>>>>
>>>>>>>> http://mysite.com:8080/ecommerce/select[something else here]
>>>>>>>>
>>>>>>>> I am not sure what the [something else here] should be
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> NOt sure if this was pre Jira or not. so you might check the Jira 
>>>>>>>>> list as well.
>>>>>>>> Didn't find anything here.
>>>>>>>>
>>>>>>>>
>>>>>>>>> Iain Mac Donald sent the following on 7/8/2006 4:32 AM:
>>>>>>>>>> I have just come across this thread
>>>>>>>>>> http://lists.ofbiz.org/pipermail/users/2005-April/007461.html
>>>>>>>>>> and I am wondering if these issues have been resolved.
>>>>>>>>>>
>>>>>>>>>> It seems the callback feature isn't working which in turn means the
>>>>>>>>>> initialise from Worldpay fails. The currency files and Worldpay 
>>>>>>>>>> certs
>>>>>>>>>> seem to get written to the correct places but because the 
>>>>>>>>>> callback fails
>>>>>>>>>> the loop isn't closed.
>>>>>>>>>>
>>>>>>>>>> Anybody using Worldpay and Ofbiz successfully?
> 

Re: worldpay integration

Posted by Iain Mac Donald <ia...@freeuk.com>.
On Mon, 2006-07-10 at 16:39 -0700, BJ Freeman wrote:
> you have done the applications/accounting/lib/worldpay/readme.txt and 
> setup the *.properties?

Partly SOLVED!

The startofbiz.sh shipped with the version of Ofbiz I am using (5274)
has the following suggested addition for Worldpay

# Worldpay
Config                                                                        
#VMARGS="-Xbootclasspath/p:applications/accounting/lib/cryptix.jar
$VMARGS"

I un-commented this and then tried an initialisation. The initialisation
failed BUT it did write the currency, merchant and certificate files.

I then realised that the path was incorrect and changed it to include
worldpay

applications/accounting/lib/worldpay/cryptix.jar

However, my initialisation attempts failed because the files had ALREADY
been written. By this point I was assuming that it was the callback URL
that was incorrect.

For the record the callback URL I am using is of the format

https://mysite.com:8443/ecommerce/select?M_controlPath=<wpdisplay
item=M_controlPath>

However my callback is still not functioning.



> 
> BJ Freeman sent the following on 7/10/2006 4:08 PM:
> > found this
> > http://lists.ofbiz.org/pipermail/users/2003-July/001332.html
> > 
> > 
> > Iain Mac Donald sent the following on 7/10/2006 3:46 PM:
> >> I have wasted days trying to get Worldpay and Ofbiz to talk to each
> >> other without success.
> >>
> >> I am getting this in the logs
> >>
> >> EXCEPTION com.worldpay.select.SelectException: Process failed
> >> Caused By: EXCEPTION com.worldpay.protocols.crypto.CryptoException:
> >> Failed to get keypair generator
> >> Caused By: EXCEPTION com.worldpay.select.SelectException: Select key
> >> generator algorithm not found
> >> Caused By: java.security.NoSuchAlgorithmException: class
> >> cryptix.provider.rsa.BaseRSAKeyPairGenerator configured for
> >> KeyPairGenerator(provider: Cryptix) cannot be acces
> >> sed.
> >>
> >> The Tomcat docs suggest this is because the JVM cannot find the JSSE JAR
> >> files. Can that be correct as Tomcat quite happily serves the correct
> >> cert to browsers.
> >>
> >> AND
> >>
> >> I still think the callback URL isn't correct.
> >>
> >> I had a look at SelectRespServlet.java and WorldPayEvents.java.
> >>
> >> My understanding is that WorldPayEvents initializes the M_ variables
> >> and passes them to WorldPay; SelectRespServlet handles the callback 
> >> and is passed back the variable contents by WorldPay.
> >>
> >> SelectRespServlet is addressed by the callback URL via
> >>
> >> https://mysite.com/ecommerce/select
> >>
> >> I notice that ofbiz requires various callback data to be returned via 
> >> the callback URL, which are initialized in WorldPayEvents:
> >>
> >> M_controlPath
> >> M_userLoginId
> >> M_dispatchName
> >> M_delegatorName
> >> M_webSiteId
> >> M_localLocale
> >> M_confirmTemplate
> >>
> >> SelectRespServlet requests those parameters (using the same name), so 
> >> presumably the callback URL should be defined as
> >>
> >> https://mysite.com/ecommerce/select?M_controlPath=<wpdisplay 
> >> item=M_controlPath>
> >>
> >>
> >> But what about the other M_ variables?
> >> And what about
> >>
> >> M_notifyEmail
> >> M_confirmEmail
> >>
> >> which are requested in SelectRespServlet but not initialized or used 
> >> anywhere else?
> >>
> >>
> >>
> >>
> >>
> >> On Sat, 2006-07-08 at 21:13 -0700, BJ Freeman wrote:
> >>> ok the M_ is used to pass back data to ofbiz. it is not  data 
> >>> processed by world pay.
> >>> The URL for the pass back is already created.
> >>>
> >>> since each product store used diffenent settings, I don't see the 
> >>> need for m_somesetting_1
> >>>
> >>> hope that helps
> >>>
> >>>
> >>> Iain Mac Donald sent the following on 7/8/2006 2:54 PM:
> >>>> I think in about 6 months I will understand your reply :)
> >>>> Currently I am at the bottom of a very steep learning curve.
> >>>>
> >>>> I could see from your previous post the URL needs to include the
> >>>> variable M_controlpath. However, what I don't know is how I express 
> >>>> that
> >>>> URL so that Ofbiz understands it.
> >>>>
> >>>> Thanks in anticipation.
> >>>>
> >>>>
> >>>> On Sat, 2006-07-08 at 11:28 -0700, BJ Freeman wrote:
> >>>>> I have not used Worldpay, but have others.
> >>>>>  From the Documentation from world pay M_ has a Different meaning 
> >>>>> the MC_. both are world pay defined.
> >>>>> http://support.worldpay.com/kb/reference/faqs/callback_faqs.html
> >>>>>
> >>>>>
> >>>>> here is sample code from world pay
> >>>>> http://support.worldpay.com/integrations/invisible/iig/pro.java
> >>>>> that shows how to send with different iinstallation and merchant ID's
> >>>>>
> >>>>>
> >>>>> application/accounting/src/org/ofbiz/thirdparty/worldpay/SelectRespServlet.java 
> >>>>> and WorldPayEvents how the send-back (call back) is handled,
> >>>>> and  shows the properties and how there are used.
> >>>>>
> >>>>> you can find reference to
> >>>>> _CONTROL_PATH_ (       linkParms.setValue("M_controlPath", 
> >>>>> (String)request.getAttribute("_CONTROL_PATH_"));
> >>>>> )
> >>>>> in
> >>>>> ControlServlet.java
> >>>>> and
> >>>>> makeLink in RequestHandler.java.
> >>>>> this will let you figure out what the real address would be.
> >>>>>
> >>>>>
> >>>>> so after all that the answer is:
> >>>>> ofbiz code is setup to handle accounts from different ProductStore.
> >>>>>          GenericValue paymentConfig = 
> >>>>> ProductStoreWorker.getProductStorePaymentSetting(delegator, 
> >>>>> productStore.getString("productStoreId"), "EXT_WORLDPAY", null, true);
> >>>>>
> >>>>> so based on the parms for that productStore, the URL is created.
> >>>>> in this case M_ is passed back to ofbiz and handled in 
> >>>>> SelectRespServlet.java
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> Iain Mac Donald sent the following on 7/8/2006 10:16 AM:
> >>>>>> Hello BJ
> >>>>>>
> >>>>>>
> >>>>>> On Sat, 2006-07-08 at 07:35 -0700, BJ Freeman wrote:
> >>>>>>> I believe andy did some work on it. it should also be in the 
> >>>>>>> emails archives.
> >>>>>> I had seen your contributions in the thread, I referenced before, 
> >>>>>> but I
> >>>>>> am probably being a bit dim
> >>>>>>
> >>>>>> <quote>
> >>>>>> We don't have to change the code.
> >>>>>> but the World pay setup for Call back has to be initialize
> >>>>>> the instruction are under
> >>>>>> "Can I have more than one callback URL per installation ID? "
> >>>>>> Finally, on the Customer Management System, you will need to set your
> >>>>>> Callback URL to include the name of the variable using wpdisplay, 
> >>>>>> e.g.:
> >>>>>> <wpdisplay item=M_controlpath>
> >>>>>> the variable used by ofbiz is M_controlpath
> >>>>>> </quote>
> >>>>>>
> >>>>>> Are you saying that all I need to do is set the callback URL to...
> >>>>>>
> >>>>>> http://mysite.com:8080/ecommerce/select[something else here]
> >>>>>>
> >>>>>> I am not sure what the [something else here] should be
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>> NOt sure if this was pre Jira or not. so you might check the Jira 
> >>>>>>> list as well.
> >>>>>> Didn't find anything here.
> >>>>>>
> >>>>>>
> >>>>>>> Iain Mac Donald sent the following on 7/8/2006 4:32 AM:
> >>>>>>>> I have just come across this thread
> >>>>>>>> http://lists.ofbiz.org/pipermail/users/2005-April/007461.html
> >>>>>>>> and I am wondering if these issues have been resolved.
> >>>>>>>>
> >>>>>>>> It seems the callback feature isn't working which in turn means the
> >>>>>>>> initialise from Worldpay fails. The currency files and Worldpay 
> >>>>>>>> certs
> >>>>>>>> seem to get written to the correct places but because the 
> >>>>>>>> callback fails
> >>>>>>>> the loop isn't closed.
> >>>>>>>>
> >>>>>>>> Anybody using Worldpay and Ofbiz successfully?
> >>
> > 

-- 
Regards,
Iain.




Re: worldpay integration

Posted by BJ Freeman <bj...@free-man.net>.
you have done the applications/accounting/lib/worldpay/readme.txt and 
setup the *.properties?

BJ Freeman sent the following on 7/10/2006 4:08 PM:
> found this
> http://lists.ofbiz.org/pipermail/users/2003-July/001332.html
> 
> 
> Iain Mac Donald sent the following on 7/10/2006 3:46 PM:
>> I have wasted days trying to get Worldpay and Ofbiz to talk to each
>> other without success.
>>
>> I am getting this in the logs
>>
>> EXCEPTION com.worldpay.select.SelectException: Process failed
>> Caused By: EXCEPTION com.worldpay.protocols.crypto.CryptoException:
>> Failed to get keypair generator
>> Caused By: EXCEPTION com.worldpay.select.SelectException: Select key
>> generator algorithm not found
>> Caused By: java.security.NoSuchAlgorithmException: class
>> cryptix.provider.rsa.BaseRSAKeyPairGenerator configured for
>> KeyPairGenerator(provider: Cryptix) cannot be acces
>> sed.
>>
>> The Tomcat docs suggest this is because the JVM cannot find the JSSE JAR
>> files. Can that be correct as Tomcat quite happily serves the correct
>> cert to browsers.
>>
>> AND
>>
>> I still think the callback URL isn't correct.
>>
>> I had a look at SelectRespServlet.java and WorldPayEvents.java.
>>
>> My understanding is that WorldPayEvents initializes the M_ variables
>> and passes them to WorldPay; SelectRespServlet handles the callback 
>> and is passed back the variable contents by WorldPay.
>>
>> SelectRespServlet is addressed by the callback URL via
>>
>> https://mysite.com/ecommerce/select
>>
>> I notice that ofbiz requires various callback data to be returned via 
>> the callback URL, which are initialized in WorldPayEvents:
>>
>> M_controlPath
>> M_userLoginId
>> M_dispatchName
>> M_delegatorName
>> M_webSiteId
>> M_localLocale
>> M_confirmTemplate
>>
>> SelectRespServlet requests those parameters (using the same name), so 
>> presumably the callback URL should be defined as
>>
>> https://mysite.com/ecommerce/select?M_controlPath=<wpdisplay 
>> item=M_controlPath>
>>
>>
>> But what about the other M_ variables?
>> And what about
>>
>> M_notifyEmail
>> M_confirmEmail
>>
>> which are requested in SelectRespServlet but not initialized or used 
>> anywhere else?
>>
>>
>>
>>
>>
>> On Sat, 2006-07-08 at 21:13 -0700, BJ Freeman wrote:
>>> ok the M_ is used to pass back data to ofbiz. it is not  data 
>>> processed by world pay.
>>> The URL for the pass back is already created.
>>>
>>> since each product store used diffenent settings, I don't see the 
>>> need for m_somesetting_1
>>>
>>> hope that helps
>>>
>>>
>>> Iain Mac Donald sent the following on 7/8/2006 2:54 PM:
>>>> I think in about 6 months I will understand your reply :)
>>>> Currently I am at the bottom of a very steep learning curve.
>>>>
>>>> I could see from your previous post the URL needs to include the
>>>> variable M_controlpath. However, what I don't know is how I express 
>>>> that
>>>> URL so that Ofbiz understands it.
>>>>
>>>> Thanks in anticipation.
>>>>
>>>>
>>>> On Sat, 2006-07-08 at 11:28 -0700, BJ Freeman wrote:
>>>>> I have not used Worldpay, but have others.
>>>>>  From the Documentation from world pay M_ has a Different meaning 
>>>>> the MC_. both are world pay defined.
>>>>> http://support.worldpay.com/kb/reference/faqs/callback_faqs.html
>>>>>
>>>>>
>>>>> here is sample code from world pay
>>>>> http://support.worldpay.com/integrations/invisible/iig/pro.java
>>>>> that shows how to send with different iinstallation and merchant ID's
>>>>>
>>>>>
>>>>> application/accounting/src/org/ofbiz/thirdparty/worldpay/SelectRespServlet.java 
>>>>> and WorldPayEvents how the send-back (call back) is handled,
>>>>> and  shows the properties and how there are used.
>>>>>
>>>>> you can find reference to
>>>>> _CONTROL_PATH_ (       linkParms.setValue("M_controlPath", 
>>>>> (String)request.getAttribute("_CONTROL_PATH_"));
>>>>> )
>>>>> in
>>>>> ControlServlet.java
>>>>> and
>>>>> makeLink in RequestHandler.java.
>>>>> this will let you figure out what the real address would be.
>>>>>
>>>>>
>>>>> so after all that the answer is:
>>>>> ofbiz code is setup to handle accounts from different ProductStore.
>>>>>          GenericValue paymentConfig = 
>>>>> ProductStoreWorker.getProductStorePaymentSetting(delegator, 
>>>>> productStore.getString("productStoreId"), "EXT_WORLDPAY", null, true);
>>>>>
>>>>> so based on the parms for that productStore, the URL is created.
>>>>> in this case M_ is passed back to ofbiz and handled in 
>>>>> SelectRespServlet.java
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Iain Mac Donald sent the following on 7/8/2006 10:16 AM:
>>>>>> Hello BJ
>>>>>>
>>>>>>
>>>>>> On Sat, 2006-07-08 at 07:35 -0700, BJ Freeman wrote:
>>>>>>> I believe andy did some work on it. it should also be in the 
>>>>>>> emails archives.
>>>>>> I had seen your contributions in the thread, I referenced before, 
>>>>>> but I
>>>>>> am probably being a bit dim
>>>>>>
>>>>>> <quote>
>>>>>> We don't have to change the code.
>>>>>> but the World pay setup for Call back has to be initialize
>>>>>> the instruction are under
>>>>>> "Can I have more than one callback URL per installation ID? "
>>>>>> Finally, on the Customer Management System, you will need to set your
>>>>>> Callback URL to include the name of the variable using wpdisplay, 
>>>>>> e.g.:
>>>>>> <wpdisplay item=M_controlpath>
>>>>>> the variable used by ofbiz is M_controlpath
>>>>>> </quote>
>>>>>>
>>>>>> Are you saying that all I need to do is set the callback URL to...
>>>>>>
>>>>>> http://mysite.com:8080/ecommerce/select[something else here]
>>>>>>
>>>>>> I am not sure what the [something else here] should be
>>>>>>
>>>>>>
>>>>>>
>>>>>>> NOt sure if this was pre Jira or not. so you might check the Jira 
>>>>>>> list as well.
>>>>>> Didn't find anything here.
>>>>>>
>>>>>>
>>>>>>> Iain Mac Donald sent the following on 7/8/2006 4:32 AM:
>>>>>>>> I have just come across this thread
>>>>>>>> http://lists.ofbiz.org/pipermail/users/2005-April/007461.html
>>>>>>>> and I am wondering if these issues have been resolved.
>>>>>>>>
>>>>>>>> It seems the callback feature isn't working which in turn means the
>>>>>>>> initialise from Worldpay fails. The currency files and Worldpay 
>>>>>>>> certs
>>>>>>>> seem to get written to the correct places but because the 
>>>>>>>> callback fails
>>>>>>>> the loop isn't closed.
>>>>>>>>
>>>>>>>> Anybody using Worldpay and Ofbiz successfully?
>>
> 

Re: worldpay integration

Posted by BJ Freeman <bj...@free-man.net>.
Ok I assume you have modified the properties in the world pay folder.
Especially about the real path to the properties.

the normal startofbiz.* needs to be modified to add
Xbootclasspath:[PATH TO]/cryptix.jar:[PATH TO]/rt.jar:[PATH TO]/i18n.jar
You have to modify the PATH TO to your configuration.

The error you got, was from the Worldpay Lib. it was it was not loading 
one of these files.

Iain Mac Donald sent the following on 7/11/2006 1:18 AM:
> On Mon, 2006-07-10 at 16:08 -0700, BJ Freeman wrote:
>> found this
>> http://lists.ofbiz.org/pipermail/users/2003-July/001332.html
>>
> 
> I did see this on the mailing list. I am using the embedded Tomcat 5.5.
> 
> I did see this on the thread
> 
> "Jetty and Orion will require the bootclasspath setting, only tested
> with
> these two."
> 
> Not sure if that means only the bootclasspath has been tested or
> only Jetty and Orion have been tested with Worldpay
> 
> 

Re: worldpay integration

Posted by Iain Mac Donald <ia...@freeuk.com>.
On Mon, 2006-07-10 at 16:08 -0700, BJ Freeman wrote:
> found this
> http://lists.ofbiz.org/pipermail/users/2003-July/001332.html
> 

I did see this on the mailing list. I am using the embedded Tomcat 5.5.

I did see this on the thread

"Jetty and Orion will require the bootclasspath setting, only tested
with
these two."

Not sure if that means only the bootclasspath has been tested or
only Jetty and Orion have been tested with Worldpay


-- 
Regards,
Iain.




Re: worldpay integration

Posted by BJ Freeman <bj...@free-man.net>.
found this
http://lists.ofbiz.org/pipermail/users/2003-July/001332.html


Iain Mac Donald sent the following on 7/10/2006 3:46 PM:
> I have wasted days trying to get Worldpay and Ofbiz to talk to each
> other without success.
> 
> I am getting this in the logs
> 
> EXCEPTION com.worldpay.select.SelectException: Process failed
> Caused By: EXCEPTION com.worldpay.protocols.crypto.CryptoException:
> Failed to get keypair generator
> Caused By: EXCEPTION com.worldpay.select.SelectException: Select key
> generator algorithm not found
> Caused By: java.security.NoSuchAlgorithmException: class
> cryptix.provider.rsa.BaseRSAKeyPairGenerator configured for
> KeyPairGenerator(provider: Cryptix) cannot be acces
> sed.
> 
> The Tomcat docs suggest this is because the JVM cannot find the JSSE JAR
> files. Can that be correct as Tomcat quite happily serves the correct
> cert to browsers.
> 
> AND
> 
> I still think the callback URL isn't correct.
> 
> I had a look at SelectRespServlet.java and WorldPayEvents.java.
> 
> My understanding is that WorldPayEvents initializes the M_ variables
> and 
> passes them to WorldPay; SelectRespServlet handles the callback and is 
> passed back the variable contents by WorldPay.
> 
> SelectRespServlet is addressed by the callback URL via
> 
> https://mysite.com/ecommerce/select
> 
> I notice that ofbiz requires various callback data to be returned via 
> the callback URL, which are initialized in WorldPayEvents:
> 
> M_controlPath
> M_userLoginId
> M_dispatchName
> M_delegatorName
> M_webSiteId
> M_localLocale
> M_confirmTemplate
> 
> SelectRespServlet requests those parameters (using the same name), so 
> presumably the callback URL should be defined as
> 
> https://mysite.com/ecommerce/select?M_controlPath=<wpdisplay 
> item=M_controlPath>
> 
> 
> But what about the other M_ variables?
> And what about
> 
> M_notifyEmail
> M_confirmEmail
> 
> which are requested in SelectRespServlet but not initialized or used 
> anywhere else?
> 
> 
> 
> 
> 
> On Sat, 2006-07-08 at 21:13 -0700, BJ Freeman wrote:
>> ok the M_ is used to pass back data to ofbiz. it is not  data processed 
>> by world pay.
>> The URL for the pass back is already created.
>>
>> since each product store used diffenent settings, I don't see the need 
>> for m_somesetting_1
>>
>> hope that helps
>>
>>
>> Iain Mac Donald sent the following on 7/8/2006 2:54 PM:
>>> I think in about 6 months I will understand your reply :)
>>> Currently I am at the bottom of a very steep learning curve.
>>>
>>> I could see from your previous post the URL needs to include the
>>> variable M_controlpath. However, what I don't know is how I express that
>>> URL so that Ofbiz understands it.
>>>
>>> Thanks in anticipation.
>>>
>>>
>>> On Sat, 2006-07-08 at 11:28 -0700, BJ Freeman wrote:
>>>> I have not used Worldpay, but have others.
>>>>  From the Documentation from world pay M_ has a Different meaning the 
>>>> MC_. both are world pay defined.
>>>> http://support.worldpay.com/kb/reference/faqs/callback_faqs.html
>>>>
>>>>
>>>> here is sample code from world pay
>>>> http://support.worldpay.com/integrations/invisible/iig/pro.java
>>>> that shows how to send with different iinstallation and merchant ID's
>>>>
>>>>
>>>> application/accounting/src/org/ofbiz/thirdparty/worldpay/SelectRespServlet.java 
>>>> and WorldPayEvents how the send-back (call back) is handled,
>>>> and  shows the properties and how there are used.
>>>>
>>>> you can find reference to
>>>> _CONTROL_PATH_ (       linkParms.setValue("M_controlPath", 
>>>> (String)request.getAttribute("_CONTROL_PATH_"));
>>>> )
>>>> in
>>>> ControlServlet.java
>>>> and
>>>> makeLink in RequestHandler.java.
>>>> this will let you figure out what the real address would be.
>>>>
>>>>
>>>> so after all that the answer is:
>>>> ofbiz code is setup to handle accounts from different ProductStore.
>>>>          GenericValue paymentConfig = 
>>>> ProductStoreWorker.getProductStorePaymentSetting(delegator, 
>>>> productStore.getString("productStoreId"), "EXT_WORLDPAY", null, true);
>>>>
>>>> so based on the parms for that productStore, the URL is created.
>>>> in this case M_ is passed back to ofbiz and handled in 
>>>> SelectRespServlet.java
>>>>
>>>>
>>>>
>>>>
>>>> Iain Mac Donald sent the following on 7/8/2006 10:16 AM:
>>>>> Hello BJ
>>>>>
>>>>>
>>>>> On Sat, 2006-07-08 at 07:35 -0700, BJ Freeman wrote:
>>>>>> I believe andy did some work on it. it should also be in the emails 
>>>>>> archives.
>>>>> I had seen your contributions in the thread, I referenced before, but I
>>>>> am probably being a bit dim
>>>>>
>>>>> <quote>
>>>>> We don't have to change the code.
>>>>> but the World pay setup for Call back has to be initialize
>>>>> the instruction are under
>>>>> "Can I have more than one callback URL per installation ID? "
>>>>> Finally, on the Customer Management System, you will need to set your
>>>>> Callback URL to include the name of the variable using wpdisplay, e.g.:
>>>>> <wpdisplay item=M_controlpath>
>>>>> the variable used by ofbiz is 
>>>>> M_controlpath
>>>>> </quote>
>>>>>
>>>>> Are you saying that all I need to do is set the callback URL to...
>>>>>
>>>>> http://mysite.com:8080/ecommerce/select[something else here]
>>>>>
>>>>> I am not sure what the [something else here] should be
>>>>>
>>>>>
>>>>>
>>>>>> NOt sure if this was pre Jira or not. so you might check the Jira list 
>>>>>> as well.
>>>>> Didn't find anything here.
>>>>>
>>>>>
>>>>>> Iain Mac Donald sent the following on 7/8/2006 4:32 AM:
>>>>>>> I have just come across this thread
>>>>>>> http://lists.ofbiz.org/pipermail/users/2005-April/007461.html
>>>>>>> and I am wondering if these issues have been resolved.
>>>>>>>
>>>>>>> It seems the callback feature isn't working which in turn means the
>>>>>>> initialise from Worldpay fails. The currency files and Worldpay certs
>>>>>>> seem to get written to the correct places but because the callback fails
>>>>>>> the loop isn't closed.
>>>>>>>
>>>>>>> Anybody using Worldpay and Ofbiz successfully?
> 

Re: worldpay integration

Posted by Iain Mac Donald <ia...@freeuk.com>.
On Tue, 2006-07-11 at 00:29 +0100, Andrew Sykes wrote:
> Iain,
> 
> Sorry, I haven't been following this thread, when are you getting this
> error? Is this when WP try to initialise your account?
> 

The initialisation attempts fail and the transaction attempts don't
complete because the initialisation has failed.

The initialisation does install the currency files, merchant data and
the certificate but the process doesn't complete.
-- 
Regards,
Iain.




Re: worldpay integration

Posted by Iain Mac Donald <ia...@freeuk.com>.
I have wasted days trying to get Worldpay and Ofbiz to talk to each
other without success.

I am getting this in the logs

EXCEPTION com.worldpay.select.SelectException: Process failed
Caused By: EXCEPTION com.worldpay.protocols.crypto.CryptoException:
Failed to get keypair generator
Caused By: EXCEPTION com.worldpay.select.SelectException: Select key
generator algorithm not found
Caused By: java.security.NoSuchAlgorithmException: class
cryptix.provider.rsa.BaseRSAKeyPairGenerator configured for
KeyPairGenerator(provider: Cryptix) cannot be acces
sed.

The Tomcat docs suggest this is because the JVM cannot find the JSSE JAR
files. Can that be correct as Tomcat quite happily serves the correct
cert to browsers.

AND

I still think the callback URL isn't correct.

I had a look at SelectRespServlet.java and WorldPayEvents.java.

My understanding is that WorldPayEvents initializes the M_ variables
and 
passes them to WorldPay; SelectRespServlet handles the callback and is 
passed back the variable contents by WorldPay.

SelectRespServlet is addressed by the callback URL via

https://mysite.com/ecommerce/select

I notice that ofbiz requires various callback data to be returned via 
the callback URL, which are initialized in WorldPayEvents:

M_controlPath
M_userLoginId
M_dispatchName
M_delegatorName
M_webSiteId
M_localLocale
M_confirmTemplate

SelectRespServlet requests those parameters (using the same name), so 
presumably the callback URL should be defined as

https://mysite.com/ecommerce/select?M_controlPath=<wpdisplay 
item=M_controlPath>


But what about the other M_ variables?
And what about

M_notifyEmail
M_confirmEmail

which are requested in SelectRespServlet but not initialized or used 
anywhere else?





On Sat, 2006-07-08 at 21:13 -0700, BJ Freeman wrote:
> ok the M_ is used to pass back data to ofbiz. it is not  data processed 
> by world pay.
> The URL for the pass back is already created.
> 
> since each product store used diffenent settings, I don't see the need 
> for m_somesetting_1
> 
> hope that helps
> 
> 
> Iain Mac Donald sent the following on 7/8/2006 2:54 PM:
> > I think in about 6 months I will understand your reply :)
> > Currently I am at the bottom of a very steep learning curve.
> > 
> > I could see from your previous post the URL needs to include the
> > variable M_controlpath. However, what I don't know is how I express that
> > URL so that Ofbiz understands it.
> > 
> > Thanks in anticipation.
> > 
> > 
> > On Sat, 2006-07-08 at 11:28 -0700, BJ Freeman wrote:
> >> I have not used Worldpay, but have others.
> >>  From the Documentation from world pay M_ has a Different meaning the 
> >> MC_. both are world pay defined.
> >> http://support.worldpay.com/kb/reference/faqs/callback_faqs.html
> >>
> >>
> >> here is sample code from world pay
> >> http://support.worldpay.com/integrations/invisible/iig/pro.java
> >> that shows how to send with different iinstallation and merchant ID's
> >>
> >>
> >> application/accounting/src/org/ofbiz/thirdparty/worldpay/SelectRespServlet.java 
> >> and WorldPayEvents how the send-back (call back) is handled,
> >> and  shows the properties and how there are used.
> >>
> >> you can find reference to
> >> _CONTROL_PATH_ (       linkParms.setValue("M_controlPath", 
> >> (String)request.getAttribute("_CONTROL_PATH_"));
> >> )
> >> in
> >> ControlServlet.java
> >> and
> >> makeLink in RequestHandler.java.
> >> this will let you figure out what the real address would be.
> >>
> >>
> >> so after all that the answer is:
> >> ofbiz code is setup to handle accounts from different ProductStore.
> >>          GenericValue paymentConfig = 
> >> ProductStoreWorker.getProductStorePaymentSetting(delegator, 
> >> productStore.getString("productStoreId"), "EXT_WORLDPAY", null, true);
> >>
> >> so based on the parms for that productStore, the URL is created.
> >> in this case M_ is passed back to ofbiz and handled in 
> >> SelectRespServlet.java
> >>
> >>
> >>
> >>
> >> Iain Mac Donald sent the following on 7/8/2006 10:16 AM:
> >>> Hello BJ
> >>>
> >>>
> >>> On Sat, 2006-07-08 at 07:35 -0700, BJ Freeman wrote:
> >>>> I believe andy did some work on it. it should also be in the emails 
> >>>> archives.
> >>> I had seen your contributions in the thread, I referenced before, but I
> >>> am probably being a bit dim
> >>>
> >>> <quote>
> >>> We don't have to change the code.
> >>> but the World pay setup for Call back has to be initialize
> >>> the instruction are under
> >>> "Can I have more than one callback URL per installation ID? "
> >>> Finally, on the Customer Management System, you will need to set your
> >>> Callback URL to include the name of the variable using wpdisplay, e.g.:
> >>> <wpdisplay item=M_controlpath>
> >>> the variable used by ofbiz is 
> >>> M_controlpath
> >>> </quote>
> >>>
> >>> Are you saying that all I need to do is set the callback URL to...
> >>>
> >>> http://mysite.com:8080/ecommerce/select[something else here]
> >>>
> >>> I am not sure what the [something else here] should be
> >>>
> >>>
> >>>
> >>>> NOt sure if this was pre Jira or not. so you might check the Jira list 
> >>>> as well.
> >>> Didn't find anything here.
> >>>
> >>>
> >>>> Iain Mac Donald sent the following on 7/8/2006 4:32 AM:
> >>>>> I have just come across this thread
> >>>>> http://lists.ofbiz.org/pipermail/users/2005-April/007461.html
> >>>>> and I am wondering if these issues have been resolved.
> >>>>>
> >>>>> It seems the callback feature isn't working which in turn means the
> >>>>> initialise from Worldpay fails. The currency files and Worldpay certs
> >>>>> seem to get written to the correct places but because the callback fails
> >>>>> the loop isn't closed.
> >>>>>
> >>>>> Anybody using Worldpay and Ofbiz successfully?
> > 

-- 
Regards,
Iain.




Re: worldpay integration

Posted by BJ Freeman <bj...@free-man.net>.
ok the M_ is used to pass back data to ofbiz. it is not  data processed 
by world pay.
The URL for the pass back is already created.

since each product store used diffenent settings, I don't see the need 
for m_somesetting_1

hope that helps


Iain Mac Donald sent the following on 7/8/2006 2:54 PM:
> I think in about 6 months I will understand your reply :)
> Currently I am at the bottom of a very steep learning curve.
> 
> I could see from your previous post the URL needs to include the
> variable M_controlpath. However, what I don't know is how I express that
> URL so that Ofbiz understands it.
> 
> Thanks in anticipation.
> 
> 
> On Sat, 2006-07-08 at 11:28 -0700, BJ Freeman wrote:
>> I have not used Worldpay, but have others.
>>  From the Documentation from world pay M_ has a Different meaning the 
>> MC_. both are world pay defined.
>> http://support.worldpay.com/kb/reference/faqs/callback_faqs.html
>>
>>
>> here is sample code from world pay
>> http://support.worldpay.com/integrations/invisible/iig/pro.java
>> that shows how to send with different iinstallation and merchant ID's
>>
>>
>> application/accounting/src/org/ofbiz/thirdparty/worldpay/SelectRespServlet.java 
>> and WorldPayEvents how the send-back (call back) is handled,
>> and  shows the properties and how there are used.
>>
>> you can find reference to
>> _CONTROL_PATH_ (       linkParms.setValue("M_controlPath", 
>> (String)request.getAttribute("_CONTROL_PATH_"));
>> )
>> in
>> ControlServlet.java
>> and
>> makeLink in RequestHandler.java.
>> this will let you figure out what the real address would be.
>>
>>
>> so after all that the answer is:
>> ofbiz code is setup to handle accounts from different ProductStore.
>>          GenericValue paymentConfig = 
>> ProductStoreWorker.getProductStorePaymentSetting(delegator, 
>> productStore.getString("productStoreId"), "EXT_WORLDPAY", null, true);
>>
>> so based on the parms for that productStore, the URL is created.
>> in this case M_ is passed back to ofbiz and handled in 
>> SelectRespServlet.java
>>
>>
>>
>>
>> Iain Mac Donald sent the following on 7/8/2006 10:16 AM:
>>> Hello BJ
>>>
>>>
>>> On Sat, 2006-07-08 at 07:35 -0700, BJ Freeman wrote:
>>>> I believe andy did some work on it. it should also be in the emails 
>>>> archives.
>>> I had seen your contributions in the thread, I referenced before, but I
>>> am probably being a bit dim
>>>
>>> <quote>
>>> We don't have to change the code.
>>> but the World pay setup for Call back has to be initialize
>>> the instruction are under
>>> "Can I have more than one callback URL per installation ID? "
>>> Finally, on the Customer Management System, you will need to set your
>>> Callback URL to include the name of the variable using wpdisplay, e.g.:
>>> <wpdisplay item=M_controlpath>
>>> the variable used by ofbiz is 
>>> M_controlpath
>>> </quote>
>>>
>>> Are you saying that all I need to do is set the callback URL to...
>>>
>>> http://mysite.com:8080/ecommerce/select[something else here]
>>>
>>> I am not sure what the [something else here] should be
>>>
>>>
>>>
>>>> NOt sure if this was pre Jira or not. so you might check the Jira list 
>>>> as well.
>>> Didn't find anything here.
>>>
>>>
>>>> Iain Mac Donald sent the following on 7/8/2006 4:32 AM:
>>>>> I have just come across this thread
>>>>> http://lists.ofbiz.org/pipermail/users/2005-April/007461.html
>>>>> and I am wondering if these issues have been resolved.
>>>>>
>>>>> It seems the callback feature isn't working which in turn means the
>>>>> initialise from Worldpay fails. The currency files and Worldpay certs
>>>>> seem to get written to the correct places but because the callback fails
>>>>> the loop isn't closed.
>>>>>
>>>>> Anybody using Worldpay and Ofbiz successfully?
> 

Re: worldpay integration

Posted by Iain Mac Donald <ia...@freeuk.com>.
I think in about 6 months I will understand your reply :)
Currently I am at the bottom of a very steep learning curve.

I could see from your previous post the URL needs to include the
variable M_controlpath. However, what I don't know is how I express that
URL so that Ofbiz understands it.

Thanks in anticipation.


On Sat, 2006-07-08 at 11:28 -0700, BJ Freeman wrote:
> I have not used Worldpay, but have others.
>  From the Documentation from world pay M_ has a Different meaning the 
> MC_. both are world pay defined.
> http://support.worldpay.com/kb/reference/faqs/callback_faqs.html
> 
> 
> here is sample code from world pay
> http://support.worldpay.com/integrations/invisible/iig/pro.java
> that shows how to send with different iinstallation and merchant ID's
> 
> 
> application/accounting/src/org/ofbiz/thirdparty/worldpay/SelectRespServlet.java 
> and WorldPayEvents how the send-back (call back) is handled,
> and  shows the properties and how there are used.
> 
> you can find reference to
> _CONTROL_PATH_ (       linkParms.setValue("M_controlPath", 
> (String)request.getAttribute("_CONTROL_PATH_"));
> )
> in
> ControlServlet.java
> and
> makeLink in RequestHandler.java.
> this will let you figure out what the real address would be.
> 
> 
> so after all that the answer is:
> ofbiz code is setup to handle accounts from different ProductStore.
>          GenericValue paymentConfig = 
> ProductStoreWorker.getProductStorePaymentSetting(delegator, 
> productStore.getString("productStoreId"), "EXT_WORLDPAY", null, true);
> 
> so based on the parms for that productStore, the URL is created.
> in this case M_ is passed back to ofbiz and handled in 
> SelectRespServlet.java
> 
> 
> 
> 
> Iain Mac Donald sent the following on 7/8/2006 10:16 AM:
> > Hello BJ
> > 
> > 
> > On Sat, 2006-07-08 at 07:35 -0700, BJ Freeman wrote:
> >> I believe andy did some work on it. it should also be in the emails 
> >> archives.
> > 
> > I had seen your contributions in the thread, I referenced before, but I
> > am probably being a bit dim
> > 
> > <quote>
> > We don't have to change the code.
> > but the World pay setup for Call back has to be initialize
> > the instruction are under
> > "Can I have more than one callback URL per installation ID? "
> > Finally, on the Customer Management System, you will need to set your
> > Callback URL to include the name of the variable using wpdisplay, e.g.:
> > <wpdisplay item=M_controlpath>
> > the variable used by ofbiz is 
> > M_controlpath
> > </quote>
> > 
> > Are you saying that all I need to do is set the callback URL to...
> > 
> > http://mysite.com:8080/ecommerce/select[something else here]
> > 
> > I am not sure what the [something else here] should be
> > 
> > 
> > 
> >> NOt sure if this was pre Jira or not. so you might check the Jira list 
> >> as well.
> > 
> > Didn't find anything here.
> > 
> > 
> >>
> >> Iain Mac Donald sent the following on 7/8/2006 4:32 AM:
> >>> I have just come across this thread
> >>> http://lists.ofbiz.org/pipermail/users/2005-April/007461.html
> >>> and I am wondering if these issues have been resolved.
> >>>
> >>> It seems the callback feature isn't working which in turn means the
> >>> initialise from Worldpay fails. The currency files and Worldpay certs
> >>> seem to get written to the correct places but because the callback fails
> >>> the loop isn't closed.
> >>>
> >>> Anybody using Worldpay and Ofbiz successfully?
> > 

-- 
Regards,
Iain.




Re: worldpay integration

Posted by BJ Freeman <bj...@free-man.net>.
I have not used Worldpay, but have others.
 From the Documentation from world pay M_ has a Different meaning the 
MC_. both are world pay defined.
http://support.worldpay.com/kb/reference/faqs/callback_faqs.html


here is sample code from world pay
http://support.worldpay.com/integrations/invisible/iig/pro.java
that shows how to send with different iinstallation and merchant ID's


application/accounting/src/org/ofbiz/thirdparty/worldpay/SelectRespServlet.java 
and WorldPayEvents how the send-back (call back) is handled,
and  shows the properties and how there are used.

you can find reference to
_CONTROL_PATH_ (       linkParms.setValue("M_controlPath", 
(String)request.getAttribute("_CONTROL_PATH_"));
)
in
ControlServlet.java
and
makeLink in RequestHandler.java.
this will let you figure out what the real address would be.


so after all that the answer is:
ofbiz code is setup to handle accounts from different ProductStore.
         GenericValue paymentConfig = 
ProductStoreWorker.getProductStorePaymentSetting(delegator, 
productStore.getString("productStoreId"), "EXT_WORLDPAY", null, true);

so based on the parms for that productStore, the URL is created.
in this case M_ is passed back to ofbiz and handled in 
SelectRespServlet.java




Iain Mac Donald sent the following on 7/8/2006 10:16 AM:
> Hello BJ
> 
> 
> On Sat, 2006-07-08 at 07:35 -0700, BJ Freeman wrote:
>> I believe andy did some work on it. it should also be in the emails 
>> archives.
> 
> I had seen your contributions in the thread, I referenced before, but I
> am probably being a bit dim
> 
> <quote>
> We don't have to change the code.
> but the World pay setup for Call back has to be initialize
> the instruction are under
> "Can I have more than one callback URL per installation ID? "
> Finally, on the Customer Management System, you will need to set your
> Callback URL to include the name of the variable using wpdisplay, e.g.:
> <wpdisplay item=M_controlpath>
> the variable used by ofbiz is 
> M_controlpath
> </quote>
> 
> Are you saying that all I need to do is set the callback URL to...
> 
> http://mysite.com:8080/ecommerce/select[something else here]
> 
> I am not sure what the [something else here] should be
> 
> 
> 
>> NOt sure if this was pre Jira or not. so you might check the Jira list 
>> as well.
> 
> Didn't find anything here.
> 
> 
>>
>> Iain Mac Donald sent the following on 7/8/2006 4:32 AM:
>>> I have just come across this thread
>>> http://lists.ofbiz.org/pipermail/users/2005-April/007461.html
>>> and I am wondering if these issues have been resolved.
>>>
>>> It seems the callback feature isn't working which in turn means the
>>> initialise from Worldpay fails. The currency files and Worldpay certs
>>> seem to get written to the correct places but because the callback fails
>>> the loop isn't closed.
>>>
>>> Anybody using Worldpay and Ofbiz successfully?
> 

Re: worldpay integration

Posted by Iain Mac Donald <ia...@freeuk.com>.
Hello BJ


On Sat, 2006-07-08 at 07:35 -0700, BJ Freeman wrote:
> I believe andy did some work on it. it should also be in the emails 
> archives.

I had seen your contributions in the thread, I referenced before, but I
am probably being a bit dim

<quote>
We don't have to change the code.
but the World pay setup for Call back has to be initialize
the instruction are under
"Can I have more than one callback URL per installation ID? "
Finally, on the Customer Management System, you will need to set your
Callback URL to include the name of the variable using wpdisplay, e.g.:
<wpdisplay item=M_controlpath>
the variable used by ofbiz is 
M_controlpath
</quote>

Are you saying that all I need to do is set the callback URL to...

http://mysite.com:8080/ecommerce/select[something else here]

I am not sure what the [something else here] should be



> NOt sure if this was pre Jira or not. so you might check the Jira list 
> as well.

Didn't find anything here.


> 
> 
> Iain Mac Donald sent the following on 7/8/2006 4:32 AM:
> > I have just come across this thread
> > http://lists.ofbiz.org/pipermail/users/2005-April/007461.html
> > and I am wondering if these issues have been resolved.
> > 
> > It seems the callback feature isn't working which in turn means the
> > initialise from Worldpay fails. The currency files and Worldpay certs
> > seem to get written to the correct places but because the callback fails
> > the loop isn't closed.
> > 
> > Anybody using Worldpay and Ofbiz successfully?

-- 
Regards,
Iain.




Re: worldpay integration

Posted by BJ Freeman <bj...@free-man.net>.
I believe andy did some work on it. it should also be in the emails 
archives.
NOt sure if this was pre Jira or not. so you might check the Jira list 
as well.


Iain Mac Donald sent the following on 7/8/2006 4:32 AM:
> I have just come across this thread
> http://lists.ofbiz.org/pipermail/users/2005-April/007461.html
> and I am wondering if these issues have been resolved.
> 
> It seems the callback feature isn't working which in turn means the
> initialise from Worldpay fails. The currency files and Worldpay certs
> seem to get written to the correct places but because the callback fails
> the loop isn't closed.
> 
> Anybody using Worldpay and Ofbiz successfully?