Hi, If I want to create the new gateway payment method,How could I to extend the gateway method without having to patch the merchant code?

96 views
Skip to first unread message

wang Nooper

unread,
Jun 12, 2014, 5:30:56 AM6/12/14
to django-...@googlegroups.com
I think I don't need to patch the  merchant code. I just only need to extend the gateway method.
What I should to do with the integration. 

Thejaswi Puthraya

unread,
Jun 12, 2014, 5:42:27 AM6/12/14
to django-...@googlegroups.com
Hello,
Integration also can be extended similar to a gateway. Can you please
let me know what you are planning to achieve?

--
Cheers
Thejaswi Puthraya
http://thejaswi.info/

wang Nooper

unread,
Jun 12, 2014, 7:13:32 AM6/12/14
to django-...@googlegroups.com
I just want to integration with china alipay , but China's Alipay have the different api method , I don't think it's not simple to integrate alipay with the merchant , I think merchant document should give an example to add the new gateway without patch the merchant code. thanks.

在 2014年6月12日星期四UTC+8下午5时30分56秒,wang Nooper写道:

Thejaswi Puthraya

unread,
Jun 12, 2014, 7:18:37 AM6/12/14
to django-...@googlegroups.com
On Thu, Jun 12, 2014 at 4:43 PM, wang Nooper <nooper...@gmail.com> wrote:
> I just want to integration with china alipay , but China's Alipay have the
> different api method , I don't think it's not simple to integrate alipay
> with the merchant , I think merchant document should give an example to add
> the new gateway without patch the merchant code. thanks.

Is this what you are looking for?
http://django-merchant.readthedocs.org/en/latest/customize.html

Please do let us know if you need any further clarifications.

>
> 在 2014年6月12日星期四UTC+8下午5时30分56秒,wang Nooper写道:
>>
>> I think I don't need to patch the merchant code. I just only need to
>> extend the gateway method.
>> What I should to do with the integration.
>
> --
> You received this message because you are subscribed to the Google Groups
> "django-merchant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-mercha...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

wang Nooper

unread,
Jun 12, 2014, 7:33:36 AM6/12/14
to django-...@googlegroups.com
what I mean is I need to write a new gateway to extend the gateway method , but I check the document  http://django-merchant.readthedocs.org/en/latest/custom_gateway.html
Create a new gateway file under the billing.gateways module which should follow this naming convention.
that means is that I need to patch the code in the merchant , I just want to install merchant as third party. apps.

在 2014年6月12日星期四UTC+8下午7时18分37秒,Thejaswi Puthraya写道:

Thejaswi Puthraya

unread,
Jun 12, 2014, 7:40:37 AM6/12/14
to django-...@googlegroups.com
On Thu, Jun 12, 2014 at 5:03 PM, wang Nooper <nooper...@gmail.com> wrote:
> what I mean is I need to write a new gateway to extend the gateway method ,
> but I check the document
> http://django-merchant.readthedocs.org/en/latest/custom_gateway.html
> Create a new gateway file under the billing.gateways module which should
> follow this naming convention.
> that means is that I need to patch the code in the merchant , I just want to
> install merchant as third party. apps.

The doc is for those people who want to contribute a new gateway to
merchant. If you don't wish to contribute your changes back, please
follow the procedure below:

Install merchant like you would normally install any python package
(pip or easy_install). In any of your own app in your django project,
add a gateways module and your custom gateway (following the name
convention) and it should get picked up automatically. No need to
patch merchant.

Here's some code to show the logic:
https://github.com/agiliq/merchant/blob/master/billing/gateway.py#L115

wang Nooper

unread,
Jun 12, 2014, 10:40:52 PM6/12/14
to django-...@googlegroups.com
Ok, Thanks for helping me , If I think I could extend the new gateway with china's alipay , I think I could contribute the new gateway modules.


在 2014年6月12日星期四UTC+8下午7时40分37秒,Thejaswi Puthraya写道:

Tomasz Grzesik

unread,
May 31, 2015, 1:28:36 AM5/31/15
to django-...@googlegroups.com
Hi Wang!

Did you manage to write alipay gateway?

Linda Patricia

unread,
Mar 18, 2024, 1:26:19 AM3/18/24
to django-merchant
Hello, I need authorize.net account. 
I'm ready to buy or partnership.
Contact me directly.

Thanks
Reply all
Reply to author
Forward
0 new messages