Created
June 17, 2020 11:45
-
-
Save ngangavic/35eda7ff62c9022e363ed6497f2e0373 to your computer and use it in GitHub Desktop.
Africas Talking Check Transaction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package africastalking; | |
import com.africastalking.AfricasTalking; | |
import com.africastalking.PaymentService; | |
import com.africastalking.payment.Transaction; | |
import com.africastalking.payment.response.CheckoutResponse; | |
public class CheckTransaction { | |
public static void main(String[] args) { | |
/* Set your app credentials */ | |
String USERNAME = Secrets.username; | |
String API_KEY = Secrets.apiKey; | |
/* Initialize SDK */ | |
AfricasTalking.initialize(USERNAME, API_KEY); | |
/* Get the payments service */ | |
PaymentService payment = AfricasTalking.getService(AfricasTalking.SERVICE_PAYMENT); | |
try { | |
Transaction response = payment.findTransaction("ATPid_3fed67fdf305772b75608c4ab87cb655"); | |
System.out.println(response.toString()); | |
} catch(Exception ex) { | |
ex.printStackTrace(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment