http://ofbiz.116.s1.nabble.com/worldpay-integration-tp140597p140607.html
geared for the default.
I don't have a WorldPay account , so I can't check this out.
> 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?
>