`
noodleLei
  • 浏览: 16021 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

OFBiz-alipay 配置文档

阅读更多

<!-- [if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--><!-- [if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:DrawingGridVerticalSpacing>7.8 磅</w:DrawingGridVerticalSpacing> <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:SpaceForUL/> <w:BalanceSingleByteDoubleByteWidth/> <w:DoNotLeaveBackslashAlone/> <w:ULTrailSpace/> <w:DoNotExpandShiftReturn/> <w:AdjustLineHeightInTable/> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> <w:UseFELayout/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!-- [if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--> <!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"\@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:42.55pt; mso-footer-margin:49.6pt; mso-paper-source:0; layout-grid:15.6pt;} div.Section1 {page:Section1;} --> <!-- [if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:普通表格; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]-->

OFBiz-alipay 配置文档

1. 将支付宝的src 下的com 文件夹复制到本模块的src 文件夹下, 再把filters 文件夹复制到刚才的com.alipay.

2. ecommerce 模块的controller.xml 中加入下面的代码:

<request-map uri="checkExternalPayment">

        <security https="true" direct-request="false"/>

        <event type="java" path="org.ofbiz.order.shoppingcart.CheckOutEvents" invoke="checkExternalPayment"/>

        <response name="none" type="request" value="emailorder"/>

        <response name="offline" type="request" value="emailorder"/>

        <response name="worldpay" type="request" value="callWorldPay"/>

        <response name="paypal" type="request" value="callPayPal"/>

       

         <response name="alipay" type="request" value="callAlipay"/><!-- Wang Suozhu 2009-07-07 addtion -->

        

        <response name="billact" type="request" value="emailorder"/>

        <response name="cod" type="request" value="emailorder"/>

        <response name="error" type="view" value="checkoutreview"/>

    </request-map>

<!-- Wang Suozhu 2009-07-07 begin -->

    <request-map uri="callAlipay">

         <security https="true" direct-request="false"/>

        <event type="java" path="org.langhua.ofbiz.alipay.AlipayEvents" invoke="callAlipay"/>

        <response name="success" type="none"/>

        <response name="error" type="view" value="checkoutreview"/>

    </request-map>

    <request-map uri="alipay_return">

        <security https="false" auth="false"/>

        <event type="java" path="org.langhua.ofbiz.alipay.AlipayServices" invoke="alipayReturn"/>

        <response name="success" type="view" value="alipay_return"/>

    </request-map>

    <request-map uri="alipay_notify">

        <security https="false" auth="false"/>

        <event type="java" path="org.langhua.ofbiz.alipay.AlipayServices" invoke="alipayNotify"/>

        <response name="success" type="view" value="alipay_notify"/>

    </request-map>

   <!-- Wang Suozhu 2009-07-07 end -->

<view-map name="alipay_return" type="screen" page="component://alipay/widget/alipay/AlipayScreens.xml#alipay_return"/>

    <view-map name="alipay_notify" type="screen" page="component://alipay/widget/alipay/AlipayScreens.xml#alipay_notify"/>

 

 

3. PaymentMethodType 实体里加入支付宝这种字符方式 (EXT_ALIPAY)

<!-- [if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:414.75pt; height:59.25pt'> <v:imagedata src="file:///C:\DOCUME~1\CUITUO~1\LOCALS~1\Temp\msohtml1\06\clip_image001.png" o:title=""/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->

将支付宝这种支付方式加入产品店铺

<!-- [if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" style='width:415.5pt;height:44.25pt'> <v:imagedata src="file:///C:\DOCUME~1\CUITUO~1\LOCALS~1\Temp\msohtml1\06\clip_image003.png" o:title=""/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->

<!-- [if gte vml 1]><v:shape id="_x0000_i1027" type="#_x0000_t75" style='width:343.5pt;height:135.75pt'> <v:imagedata src="file:///C:\DOCUME~1\CUITUO~1\LOCALS~1\Temp\msohtml1\06\clip_image005.png" o:title=""/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->

<!-- [if gte vml 1]><v:shape id="_x0000_i1028" type="#_x0000_t75" style='width:414.75pt;height:83.25pt'> <v:imagedata src="file:///C:\DOCUME~1\CUITUO~1\LOCALS~1\Temp\msohtml1\06\clip_image007.png" o:title=""/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->

4. 在下面的付款方式页面中 (checkoutopptions.ftl) 加入支付宝的支付方式

 

<!-- [if gte vml 1]><v:shape id="_x0000_i1029" type="#_x0000_t75" style='width:414.75pt;height:163.5pt'> <v:imagedata src="file:///C:\DOCUME~1\CUITUO~1\LOCALS~1\Temp\msohtml1\06\clip_image009.png" o:title=""/> </v:shape><![endif]--><!-- [if !vml]--><!-- [endif]-->

代码如下 :

<!-- Wang Suozhu 2009-07-07   begin-->

                  <#if productStorePaymentMethodTypeIdMap.EXT_ALIPAY?exists>

                  <tr>

                    <td width="1%">

                      <input type="radio" name="checkOutPaymentId" value="EXT_ALIPAY" <#if "EXT_ALIPAY" == checkOutPaymentId>checked="checked"</#if>/>

                    </td>

                    <td width="50%">

                      <span class="tabletext"> 支付宝</span>

                    </td>

                  </tr>

                  </#if>

                  <!-- Wang Suozhu 2009-07-07   end-->

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics