Closed rvillablanca closed 4 years ago
@rvillablanca Thanks for your work. 🚀
It is a good idea to separate the logic between webpay and signer, it's more reusable.
But what do you think if we move the signature package to /pkg
?
(microapis/transbank-sdk-golang/pkg/sign)
Just tell me what you think.
I think it should be ok, the important part is to separete them. I think a more clear separation would be even something like a microapis/transbank-sdk-golang/pkg/soap
for parts that are related with the SOAP message only, because right now with this refactor some types like SoapFault
now will live under sign
package. I notice that after doing this PR, but it could be improved in another PR.
Great work BTW :+1:
Sounds good. Let's merge this PR and i send another with the proposal. (#5)
Thanks again.
This is a proposal PR that separates in two packages the responsabilities of each one. A new package
github.com/microapis/transbank-sdk-golang/pkg/webpay/sign
was created which is responsible of the signature of any Webpay transaction (normal
,mall
,oneclick
, etc).The idea is to embed the type
sign.SOAPSigner
in the required transaction:This way the signature and the payload are separade and less coupled.
Additionally this PR includes some small fixes include in #3