summaryrefslogtreecommitdiff
path: root/order_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'order_test.go')
-rw-r--r--order_test.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/order_test.go b/order_test.go
index ff8119c..a780961 100644
--- a/order_test.go
+++ b/order_test.go
@@ -66,3 +66,30 @@ func TestSendHiaRequest(t *testing.T) {
body, err := io.ReadAll(resp.Body)
t.Log(string(body))
}
+
+func TestSendHpbRequest(t *testing.T) {
+ signatureCertificate, err := ReadCertificateFromFile(filepath.Join("certs", "signature_cert.pem"), A005)
+ if err != nil {
+ t.Error(err.Error())
+ }
+
+ hpb, err := GenerateHpbRequest(*signatureCertificate)
+ if err != nil {
+ t.Error(err.Error())
+ }
+
+ t.Log(hpb)
+
+ resp, err := http.Post(
+ "https://ebics-test.multivia-suite.de/MVB_ENT/ebicsweb",
+ "text/xml; charset=UTF-8",
+ strings.NewReader(hpb),
+ )
+ if err != nil {
+ t.Error(err.Error())
+ }
+ defer resp.Body.Close()
+
+ body, err := io.ReadAll(resp.Body)
+ t.Log(string(body))
+}