@@ -24,17 +24,20 @@ if __name__ == "__main__":
2424
2525 gateway = Gateway(" <your private key>" , " <your public key>" )
2626
27- payload = {
28- " description" : " Golden Ticket" ,
29- " amount" : " 0.01" ,
30- " currency" : " EUR" ,
31- " merchant_order_id" : " xxxxx" ,
32- " success_url" : " https://yourcompanywebsite.com/success"
27+ parameters = {
28+ " payload" : {
29+ " description" : " Golden Ticket" ,
30+ " amount" : " 0.01" ,
31+ " currency" : " EUR" ,
32+ " merchant_order_id" : random.randint(1000 , 9999 ),
33+ " success_url" : " http://localhost:12345/success.php" ,
34+ },
35+ " auto_submit_form" : True
3336 }
3437
35- paymentForm = gateway.payment_form().build_form(payload )
38+ paymentForm = gateway.payment_form().build_form(parameters )
3639
37- print paymentForm
40+ print paymentForm
3841```
3942
4043For more information on the API Parameters, refer to our entire API Documentation [ here] ( https://docs.fasterpay.com/api#section-custom-integration )
@@ -43,7 +46,7 @@ For more information on the API Parameters, refer to our entire API Documentatio
4346
4447``` python
4548from flask import request
46- from fasterpay.gateway import FP_Gateway
49+ from fasterpay.gateway import Gateway
4750gateway = Gateway(" <your private key>" , " <your public key>" )
4851if gateway.pingback().validate({" apiKey" : request.headers.get(" X-ApiKey" )}) is True :
4952 print " OK"
@@ -57,7 +60,7 @@ FasterPay has a Sandbox environment called Test Mode. Test Mode is a virtual tes
5760### Initiating FasterPay Gateway in Test-Mode
5861``` python
5962from fasterpay.gateway import Gateway
60- gateway = Gateway(" <your private key>" , " <your public key>" , " https://pay.sandbox.faterpay.com " )
63+ gateway = Gateway(" <your private key>" , " <your public key>" , is_test = False )
6164```
6265
6366### Questions?
0 commit comments