worldpay integration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

worldpay integration

Iain Mac Donald
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.



Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

BJ Freeman
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?
Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

Iain Mac Donald
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.



Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

BJ Freeman
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?
>
Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

Iain Mac Donald

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.



Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

BJ Freeman
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?
>
Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

Iain Mac Donald

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.



Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

BJ Freeman
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?
>
Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

BJ Freeman
In reply to this post by Iain Mac Donald
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?
>
Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

BJ Freeman
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?
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

Iain Mac Donald
In reply to this post by BJ Freeman
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.



Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

Iain Mac Donald
In reply to this post by Iain Mac Donald
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.



Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

BJ Freeman
In reply to this post by Iain Mac Donald
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
>
>
Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

Iain Mac Donald
In reply to this post by BJ Freeman
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.



Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

BJ Freeman
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?
>
Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

Iain Mac Donald
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.



EXCEPTION.txt (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

BJ Freeman
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?
>
Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

Iain Mac Donald
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.



Reply | Threaded
Open this post in threaded view
|

Re: worldpay integration

BJ Freeman
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?
>>>
>