5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/paypal/masspay.rb', line 5
def self.masspay(payer_email, receiver_email, amount, currency, note, unique_id)
request_uri = URI.parse(Paypal.nvp_uri)
request_uri.scheme = "https"
body = {
"METHOD" => "MassPay",
"VERSION" => "2.3",
"CURRENCYCODE" => currency,
"SUBJECT" => payer_email,
"USER" => Paypal.api_username,
"PWD" => Paypal.api_password,
"SIGNATURE" => Paypal.api_signature,
"RECEIVERTYPE" => "EmailAddress",
"L_EMAIL0" => receiver_email,
"L_AMT0" => amount,
"L_UNIQUEID0" => unique_id,
"L_NOTE0" => note
}
self.post(request_uri.to_s, :body => body).body
end
|