This file contains 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
using PayPal; | |
using PayPal.Api.Payments; | |
using System.Collections.Generic; | |
CreditCard credtCard = new CreditCard(); | |
credtCard.expire_month = 11; | |
credtCard.expire_year = 2018; | |
credtCard.number = "4417119669820331"; | |
credtCard.type = "visa"; |
This file contains 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
import com.paypal.api.payments.CreditCard; | |
import com.paypal.core.rest.APIContext; | |
import com.paypal.core.rest.PayPalRESTException; | |
import java.util.HashMap; | |
CreditCard cc = new CreditCard(); | |
cc.setExpireMonth(11) | |
.setExpireYear(2018).setFirstName("Joe") | |
.setLastName("Shopper").setNumber("4111111111111111").setType("visa") | |
.setCvv2("874"); |
This file contains 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
import urllib | |
import urlparse | |
import collections | |
import httplib | |
def TestPayment(): | |
#Set our headers | |
headers = { | |
'X-PAYPAL-SECURITY-USERID': 'jb-us-seller_api1.paypal.com', | |
'X-PAYPAL-SECURITY-PASSWORD': 'WX4WTU3S8MY44S7F', |