Skip to content

Commit

Permalink
Updating to latest version of paypal class.
Browse files Browse the repository at this point in the history
  • Loading branch information
thenbrent committed Oct 27, 2011
1 parent fe3d6e2 commit 86cb0a2
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion paypal/paypal-digital-goods.class.php
Expand Up @@ -287,7 +287,7 @@ function start_subscription(){
*
* @param $from, string, default PayPal. The Subscription details can be sourced from the object's properties if you know they will be already set or from PayPal (default).
*/
function get_subscription_details( $profile_id, $from = '' ){
function get_profile_details( $profile_id ){

return $this->call_paypal( 'GetRecurringPaymentsProfileDetails', $profile_id );
}
Expand Down Expand Up @@ -567,6 +567,24 @@ function get_currency_symbol( $currency_code = '', $echo = false ){
}


/**
* Get the value of a given subscription detail, eg. amount
*
* For a list of the available values of $key, see the $defaults array in the constructor.
*/
function get_subscription_detail( $key ){

if( isset( $this->$key ) )
$value = $this->$key;
elseif( isset( $this->subscription->$key ) )
$value = $this->subscription->$key;
else
$value = false;

return $value;
}


/**
* Takes a PayPal API Key and maps it to a more human friendly term.
*
Expand Down

0 comments on commit 86cb0a2

Please sign in to comment.