diff --git a/README.md b/README.md index c2dbed5..c63afdb 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ func pay() gin.HandlerFunc { // Get Transaction ID transactionID := payment.GetTransactionID() // Redirect the user to the bank payment page. - payUrl := payment.PayUrl() + payUrl := payment.PayURL() c.Redirect(http.StatusFound, payUrl) } } diff --git a/gateway/driver.go b/gateway/driver.go index 256f962..e8a698f 100644 --- a/gateway/driver.go +++ b/gateway/driver.go @@ -9,8 +9,8 @@ import ( type Driver interface { // Purchase sends a purchase request to the driver's gateway. Purchase(invoice *invoice.Invoice) (string, error) - // PayUrl returns the url to redirect the user to for payment. - PayUrl(invoice *invoice.Invoice) string + // PayURL returns the url to redirect the user to for payment. + PayURL(invoice *invoice.Invoice) string // GetDriverName returns the name of the driver. GetDriverName() string // Verify checks the payment status of the invoice. diff --git a/gopayment.go b/gopayment.go index ac64d1a..b1e6252 100644 --- a/gopayment.go +++ b/gopayment.go @@ -37,7 +37,7 @@ func (p *Payment) Purchase() error { // PayURL return the payment URL func (p *Payment) PayURL() string { - return p.driver.PayUrl(p.invoice) + return p.driver.PayURL(p.invoice) } // PayMethod returns the Request Method to be used to pay the invoice. diff --git a/test/gopayment_test.go b/test/gopayment_test.go index 9165535..05c9b02 100644 --- a/test/gopayment_test.go +++ b/test/gopayment_test.go @@ -59,7 +59,7 @@ func (g *Gateway) Purchase(invoice *invoice.Invoice) (string, error) { } return invoice.GetUUID(), nil } -func (g *Gateway) PayUrl(invoice *invoice.Invoice) string { +func (g *Gateway) PayURL(invoice *invoice.Invoice) string { return "Gateway.com/" + invoice.GetTransactionID() } func (g *Gateway) Verify(interface{}) (*receipt.Receipt, error) {