我正在尝试在Codeigniter中集成Tap支付网关。我正在使用https://github.com/iZaL/tap-payment-php api。因为这不会给你任何php支持或任何文档。
所以,我在过去的两天里一直在努力让这件事情发挥作用,到目前为止我已经做到了。
这是我成功获得的回复:
BILLING
IZaL\Tap\TapBilling Object
(
[ApiKey:protected] => 1tap7
[MerchantID:protected] => mymercid
[UserName:protected] => Tap@PS13
[Password:protected] => *****
[ErrorURL:protected] =>
[PaymentURL:protected] => https://www.gotapnow.com/TapWebConnect/Tap/WebPay/PaymentRequest
[PaymentOption:protected] => ALL
[AutoReturn:protected] => Y
[CurrencyCode:protected] => KWD
[LangCode:protected] => AR
[TotalAmount:protected] => 800
[customerInfo:protected] => Array
(
[Email] => customer@email.com
[Name] => Awesome Customer
[Mobile] => 9999999
)
[productInfo:protected] => Array
(
[0] => Array
(
[Quantity] => 1
[TotalPrice] => 500
[UnitName] => Product Name
[UnitDesc] => Product Description
[UnitPrice] => 500
)
[1] => Array
(
[Quantity] => 2
[TotalPrice] => 300
[UnitName] => Product Name
[UnitDesc] => Product Description
[UnitPrice] => 150
)
)
[gatewayInfo:protected] => Array
(
[Name] => ALL
)
[merchantInfo:protected] => Array
(
[ReturnURL] => http://sandbox/tap-payment-php-master/tests/TapBillingTest.php
[ReferenceID] => 5addbc03781e0
)
[response] => IZaL\Tap\TapBillingResponse Object
(
[response] => GuzzleHttp\Psr7\Response Object
(
[reasonPhrase:GuzzleHttp\Psr7\Response:private] => OK
[statusCode:GuzzleHttp\Psr7\Response:private] => 200
[headers:GuzzleHttp\Psr7\Response:private] => Array
(
[Cache-Control] => Array
(
[0] => no-cache
)
[Pragma] => Array
(
[0] => no-cache
)
[Content-Type] => Array
(
[0] => application/json; charset=utf-8
)
[Expires] => Array
(
[0] => -1
)
[Server] => Array
(
[0] => Microsoft-IIS/8.0
)
[X-Powered-By] => Array
(
[0] => UrlRewriter.NET 1.7.0
)
[X-AspNet-Version] => Array
(
[0] => 4.0.30319
)
[Date] => Array
(
[0] => Mon, 23 Apr 2018 11:01:38 GMT
)
[Content-Length] => Array
(
[0] => 251
)
)
[headerNames:GuzzleHttp\Psr7\Response:private] => Array
(
[cache-control] => Cache-Control
[pragma] => Pragma
[content-type] => Content-Type
[expires] => Expires
[server] => Server
[x-powered-by] => X-Powered-By
[x-aspnet-version] => X-AspNet-Version
[date] => Date
[content-length] => Content-Length
)
[protocol:GuzzleHttp\Psr7\Response:private] => 1.1
[stream:GuzzleHttp\Psr7\Response:private] => GuzzleHttp\Psr7\Stream Object
(
[stream:GuzzleHttp\Psr7\Stream:private] => Resource id #43
[size:GuzzleHttp\Psr7\Stream:private] =>
[seekable:GuzzleHttp\Psr7\Stream:private] => 1
[readable:GuzzleHttp\Psr7\Stream:private] => 1
[writable:GuzzleHttp\Psr7\Stream:private] => 1
[uri:GuzzleHttp\Psr7\Stream:private] => php://temp
[customMetadata:GuzzleHttp\Psr7\Stream:private] => Array
(
)
)
)
[ApiKey:protected] =>
[MerchantID:protected] =>
[UserName:protected] =>
[Password:protected] =>
[ErrorURL:protected] =>
[PaymentURL:protected] => https://www.gotapnow.com/TapWebConnect/Tap/WebPay/PaymentRequest
[PaymentOption:protected] => ALL
[AutoReturn:protected] => Y
[CurrencyCode:protected] => KWD
[LangCode:protected] => AR
[TotalAmount:protected] => 800
[customerInfo:protected] => Array
(
)
[productInfo:protected] => Array
(
)
[gatewayInfo:protected] => Array
(
)
[merchantInfo:protected] => Array
(
)
[requiredConstructorKeys:protected] => Array
(
)
)
[requiredConstructorKeys:protected] => Array
(
)
)
paymentRequest
IZaL\Tap\TapBilling Object
(
[ApiKey:protected] => 1tap7
[MerchantID:protected] => 70518
[UserName:protected] => Tap@PS13
[Password:protected] => PSt@13Tap
[ErrorURL:protected] =>
[PaymentURL:protected] => https://www.gotapnow.com/TapWebConnect/Tap/WebPay/PaymentRequest
[PaymentOption:protected] => ALL
[AutoReturn:protected] => Y
[CurrencyCode:protected] => KWD
[LangCode:protected] => AR
[TotalAmount:protected] => 800
[customerInfo:protected] => Array
(
[Email] => customer@email.com
[Name] => Awesome Customer
[Mobile] => 9999999
)
[productInfo:protected] => Array
(
[0] => Array
(
[Quantity] => 1
[TotalPrice] => 500
[UnitName] => Product Name
[UnitDesc] => Product Description
[UnitPrice] => 500
)
[1] => Array
(
[Quantity] => 2
[TotalPrice] => 300
[UnitName] => Product Name
[UnitDesc] => Product Description
[UnitPrice] => 150
)
)
[gatewayInfo:protected] => Array
(
[Name] => ALL
)
[merchantInfo:protected] => Array
(
[ReturnURL] => http://sandbox/tap-payment-php-master/tests/TapBillingTest.php
[ReferenceID] => 5addbc03781e0
)
[response] => IZaL\Tap\TapBillingResponse Object
(
[response] => GuzzleHttp\Psr7\Response Object
(
[reasonPhrase:GuzzleHttp\Psr7\Response:private] => OK
[statusCode:GuzzleHttp\Psr7\Response:private] => 200
[headers:GuzzleHttp\Psr7\Response:private] => Array
(
[Cache-Control] => Array
(
[0] => no-cache
)
[Pragma] => Array
(
[0] => no-cache
)
[Content-Type] => Array
(
[0] => application/json; charset=utf-8
)
[Expires] => Array
(
[0] => -1
)
[Server] => Array
(
[0] => Microsoft-IIS/8.0
)
[X-Powered-By] => Array
(
[0] => UrlRewriter.NET 1.7.0
)
[X-AspNet-Version] => Array
(
[0] => 4.0.30319
)
[Date] => Array
(
[0] => Mon, 23 Apr 2018 11:01:38 GMT
)
[Content-Length] => Array
(
[0] => 251
)
)
[headerNames:GuzzleHttp\Psr7\Response:private] => Array
(
[cache-control] => Cache-Control
[pragma] => Pragma
[content-type] => Content-Type
[expires] => Expires
[server] => Server
[x-powered-by] => X-Powered-By
[x-aspnet-version] => X-AspNet-Version
[date] => Date
[content-length] => Content-Length
)
[protocol:GuzzleHttp\Psr7\Response:private] => 1.1
[stream:GuzzleHttp\Psr7\Response:private] => GuzzleHttp\Psr7\Stream Object
(
[stream:GuzzleHttp\Psr7\Stream:private] => Resource id #43
[size:GuzzleHttp\Psr7\Stream:private] =>
[seekable:GuzzleHttp\Psr7\Stream:private] => 1
[readable:GuzzleHttp\Psr7\Stream:private] => 1
[writable:GuzzleHttp\Psr7\Stream:private] => 1
[uri:GuzzleHttp\Psr7\Stream:private] => php://temp
[customMetadata:GuzzleHttp\Psr7\Stream:private] => Array
(
)
)
)
[ApiKey:protected] =>
[MerchantID:protected] =>
[UserName:protected] =>
[Password:protected] =>
[ErrorURL:protected] =>
[PaymentURL:protected] => https://www.gotapnow.com/TapWebConnect/Tap/WebPay/PaymentRequest
[PaymentOption:protected] => ALL
[AutoReturn:protected] => Y
[CurrencyCode:protected] => KWD
[LangCode:protected] => AR
[TotalAmount:protected] => 800
[customerInfo:protected] => Array
(
)
[productInfo:protected] => Array
(
)
[gatewayInfo:protected] => Array
(
)
[merchantInfo:protected] => Array
(
)
[requiredConstructorKeys:protected] => Array
(
)
)
[requiredConstructorKeys:protected] => Array
(
)
)
payment Response
stdClass Object
(
[ReferenceID] => 204232018320144980
[ResponseCode] => 0
[ResponseMessage] => Success
[TapPayURL] => https://www.gotapnow.com/webpay.aspx
[PaymentURL] => https://www.gotapnow.com/webpay.aspx?ref=204232018320144980&sess=ir2%2bGzVBwwM51cvkOTtnR69nS%2bVU24bu
)
paymentURL
https://www.gotapnow.com/webpay.aspx?ref=204232018320144980&sess=ir2%2bGzVBwwM51cvkOTtnR69nS%2bVU24bu
paymentReferenceID
204232018320144980
null
正如你最后看到的那样,我得到了成功的反应,但当我点击这个网址时,它给了我:
处理付款时遇到错误!
我尝试了我和其他方面的一切,所以如果有人能帮助我,那将是非常好的。
谢谢!